diff --git a/Cargo.toml b/Cargo.toml index ecccffe..080c69e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -9,6 +9,7 @@ keywords = ["error", "result"] [dependencies] serde_json = { version = "1.0", optional = true } +ureq = { version = "2.6", optional = true } [features] default = [] diff --git a/src/lib.rs b/src/lib.rs index 16335be..6ea5662 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -69,3 +69,10 @@ impl From for Rear { Self { message: error.to_string(), error: error.into() } } } + +#[cfg(feature = "ureq")] +impl From for Rear { + fn from(error: ureq::Error) -> Self { + Self { message: error.to_string(), error: error.into() } + } +}