Remove deprecated std::error::Error trait method impls
The `description` method was deprecated in Rust `v1.42`. The `cause` method was deprecated in Rust `v1.33`. Our MSRV is now Rust `v1.63`. We do not need to implement the deprecated functions any longer. Fix: #3869
This commit is contained in:
parent
dc76043dcf
commit
1e503a8d3b
|
@ -76,19 +76,6 @@ impl std::error::Error for Error {
|
|||
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
|
||||
self.error.as_ref().and_then(|e| e.as_ref().source())
|
||||
}
|
||||
|
||||
#[allow(deprecated)]
|
||||
fn description(&self) -> &str {
|
||||
match self.error.as_ref() {
|
||||
Some(e) => e.description(),
|
||||
None => self.kind.description(),
|
||||
}
|
||||
}
|
||||
|
||||
#[allow(deprecated)]
|
||||
fn cause(&self) -> Option<&dyn std::error::Error> {
|
||||
self.error.as_ref().and_then(|e| e.as_ref().cause())
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(feature = "std")]
|
||||
|
|
Loading…
Reference in New Issue