Opening hours completed. Leptos upgraded to 0.5.2.
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
use std::error::Error;
|
||||
use std::fmt::{Debug, Display, Formatter};
|
||||
|
||||
#[derive(Debug, Eq, PartialEq)]
|
||||
pub enum AppError {
|
||||
HourParseError
|
||||
}
|
||||
|
||||
impl AppError {
|
||||
fn as_string(&self) -> String {
|
||||
//match self { AppError::HourParseError => {"Hour parse error"} }
|
||||
"Hours parse error".to_string()
|
||||
}
|
||||
}
|
||||
|
||||
impl Display for AppError {
|
||||
fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
|
||||
write!(f, "{}", self.as_string())
|
||||
}
|
||||
}
|
||||
|
||||
impl Error for AppError {}
|
||||
Reference in New Issue
Block a user