This commit is contained in:
Dominik Werder
2021-04-14 11:38:17 +02:00
parent a6839a487f
commit 06c9963605
11 changed files with 238 additions and 93 deletions

View File

@@ -1,3 +1,5 @@
use std::num::ParseIntError;
#[derive(Debug)]
pub struct Error {
msg: String,
@@ -75,3 +77,11 @@ impl From<chrono::format::ParseError> for Error {
}
}
}
impl From<ParseIntError> for Error {
fn from (k: ParseIntError) -> Self {
Self {
msg: k.to_string(),
}
}
}