blob: 534fdce7d785abb1bfe6355f9ac7cdbedf499f7e [file] [log] [blame]
use core::{
fmt,
fmt::{Debug, Display, Formatter},
};
use error_stack::Context;
#[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord)]
pub enum FloydWarshallError {
NegativeCycle,
}
impl Display for FloydWarshallError {
fn fmt(&self, f: &mut Formatter<'_>) -> fmt::Result {
match self {
Self::NegativeCycle => f.write_str("graph contains a negative cycle"),
}
}
}
impl Context for FloydWarshallError {}