Sergio Chouhy 9e3c9b3ae8 add errors
2025-07-20 00:07:10 -03:00

17 lines
359 B
Rust

#[derive(Debug)]
pub enum Error {
NotFound,
BadInput,
}
impl std::fmt::Display for Error {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match self {
Error::NotFound => write!(f, "Not found"),
Error::BadInput => write!(f, "Bad input"),
}
}
}
impl std::error::Error for Error {}