add ureq::Error behind feature flag

master
rascul 8 months ago
parent 91d4c18a9c
commit 3fb4b3dccf

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

@ -69,3 +69,10 @@ impl From<serde_json::Error> for Rear {
Self { message: error.to_string(), error: error.into() } Self { message: error.to_string(), error: error.into() }
} }
} }
#[cfg(feature = "ureq")]
impl From<ureq::Error> for Rear {
fn from(error: ureq::Error) -> Self {
Self { message: error.to_string(), error: error.into() }
}
}

Loading…
Cancel
Save