use std::fmt::{Debug, Display, Formatter, Result};
use std::num::TryFromIntError;
#[derive(Debug)]
pub enum Error {
Conversion(TryFromIntError),
Overrun,
}
impl std::error::Error for Error {}
impl Display for Error {
fn fmt(&self, f: &mut Formatter) -> Result {
write!(f, "{:?}", self)
}
}
impl From<TryFromIntError> for Error {
fn from(err: TryFromIntError) -> Self {
Self::Conversion(err)
}
}