Changed impl `Error::cause()` to `Error::source()`
This implements `source()` method instead of `cause()` allowing downcasting.
This commit is contained in:
parent
cabb8f9e6f
commit
df081bede0
|
@ -377,8 +377,7 @@ impl fmt::Display for Error {
|
||||||
#[cfg(feature = "std")]
|
#[cfg(feature = "std")]
|
||||||
#[cfg_attr(docsrs, doc(cfg(feature = "std")))]
|
#[cfg_attr(docsrs, doc(cfg(feature = "std")))]
|
||||||
impl std::error::Error for Error {
|
impl std::error::Error for Error {
|
||||||
#[allow(deprecated)]
|
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
|
||||||
fn cause(&self) -> Option<&dyn std::error::Error> {
|
|
||||||
match self {
|
match self {
|
||||||
Error::IncorrectSignature => None,
|
Error::IncorrectSignature => None,
|
||||||
Error::InvalidMessage => None,
|
Error::InvalidMessage => None,
|
||||||
|
|
Loading…
Reference in New Issue