support String error

master
rascul 8 months ago
parent 77bd9e968e
commit 4ddfd7d8fc

@ -57,6 +57,12 @@ impl From<std::io::Error> for Rear {
}
}
impl From<String> for Rear {
fn from(error: String) -> Self {
Self { message: error.clone(), error: error.into() }
}
}
#[cfg(feature = "serde_json")]
impl From<serde_json::Error> for Rear {
fn from(error: serde_json::Error) -> Self {

Loading…
Cancel
Save