add log::SetLoggerError behind feature flag

master
rascul 8 months ago
parent 9fe4dcb85f
commit 38b72af396

@ -9,6 +9,7 @@ keywords = ["error", "result"]
[dependencies]
askama = { version = "0.12", optional = true }
log = { version = "0.4", features = ["std"], optional = true }
serde_json = { version = "1.0", optional = true }
ureq = { version = "2.6", optional = true }

@ -76,6 +76,13 @@ impl From<askama::Error> for Rear {
}
}
#[cfg(feature = "log")]
impl From<log::SetLoggerError> for Rear {
fn from(error: log::SetLoggerError) -> Self {
Self { message: error.to_string(), error: error.into() }
}
}
#[cfg(feature = "serde_json")]
impl From<serde_json::Error> for Rear {
fn from(error: serde_json::Error) -> Self {

Loading…
Cancel
Save