use std::fmt;
#[derive(Clone, Copy, Debug, Eq, PartialEq)]
pub enum Error {
BadBox,
BufferSize,
Empty,
}
impl fmt::Display for Error {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
match self {
Error::BadBox => write!(f, "singular or non-positive cell"),
Error::BufferSize => write!(f, "out buffer length must match the pair count"),
Error::Empty => write!(f, "no pairs"),
}
}
}
impl std::error::Error for Error {}