|
|
@ -31,10 +31,7 @@ impl Rear {
|
|
|
|
let error = error.into();
|
|
|
|
let error = error.into();
|
|
|
|
let message = message.into();
|
|
|
|
let message = message.into();
|
|
|
|
|
|
|
|
|
|
|
|
Self {
|
|
|
|
Self { error, message }
|
|
|
|
error,
|
|
|
|
|
|
|
|
message,
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -50,29 +47,19 @@ impl Display for Rear {
|
|
|
|
|
|
|
|
|
|
|
|
impl From<Box<dyn Error>> for Rear {
|
|
|
|
impl From<Box<dyn Error>> for Rear {
|
|
|
|
fn from(error: Box<dyn Error>) -> Self {
|
|
|
|
fn from(error: Box<dyn Error>) -> Self {
|
|
|
|
Self {
|
|
|
|
Self { error, message: String::new() }
|
|
|
|
error: error,
|
|
|
|
|
|
|
|
message: String::new(),
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
impl From<std::io::Error> for Rear {
|
|
|
|
impl From<std::io::Error> for Rear {
|
|
|
|
fn from(error: std::io::Error) -> Self {
|
|
|
|
fn from(error: std::io::Error) -> Self {
|
|
|
|
Self {
|
|
|
|
Self { message: error.to_string(), error: error.into() }
|
|
|
|
message: error.to_string(),
|
|
|
|
|
|
|
|
error: error.into(),
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
#[cfg(feature = "serde_json")]
|
|
|
|
#[cfg(feature = "serde_json")]
|
|
|
|
impl From<serde_json::Error> for Rear {
|
|
|
|
impl From<serde_json::Error> for Rear {
|
|
|
|
fn from(error: serde_json::Error) -> Self {
|
|
|
|
fn from(error: serde_json::Error) -> Self {
|
|
|
|
let message: String = error.to_string();
|
|
|
|
Self { message: error.to_string(), error: error.into() }
|
|
|
|
Self {
|
|
|
|
|
|
|
|
error: error.into(),
|
|
|
|
|
|
|
|
message: message,
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|