Remove deprecated Error description, replaced by Display
The Display trait is already implemented, so this is only a code deletion. Fixes 1.42-nightly warning: warning: use of deprecated item 'std::error::Error::description': use the Display impl or to_string() --> src/protocol/mod.rs:981:40 | 981 | Error::IOError(ref e) => e.description(), | ^^^^^^^^^^^ | = note: `#[warn(deprecated)]` on by default
This commit is contained in:
parent
dd2fb32df1
commit
a833ef7bf5
|
@ -973,18 +973,7 @@ impl convert::From<reqwest::Error> for Error {
|
|||
}
|
||||
}
|
||||
|
||||
impl ::std::error::Error for Error {
|
||||
fn description(&self) -> &str {
|
||||
match *self {
|
||||
Error::Err(ref val) => &val[..],
|
||||
Error::Disconnect(_) => "Disconnect",
|
||||
Error::IOError(ref e) => e.description(),
|
||||
Error::Json(ref e) => e.description(),
|
||||
#[cfg(not(target_arch = "wasm32"))]
|
||||
Error::Reqwest(ref e) => e.description(),
|
||||
}
|
||||
}
|
||||
}
|
||||
impl ::std::error::Error for Error {}
|
||||
|
||||
impl ::std::fmt::Display for Error {
|
||||
fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
|
||||
|
|
Loading…
Reference in New Issue