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:
ice_iix 2020-01-04 19:20:36 -08:00
parent dd2fb32df1
commit a833ef7bf5
1 changed files with 1 additions and 12 deletions

View File

@ -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 {