add ureq::Error behind feature flag

master
rascul 10 months ago
parent 91d4c18a9c
commit 3fb4b3dccf

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

@ -69,3 +69,10 @@ impl From<serde_json::Error> for Rear {
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