mirror of
https://github.com/fluencelabs/rust-libp2p
synced 2025-06-13 01:51:23 +00:00
Cleanup. (#803)
- Use `Error::source` instead of `Error::cause`. - Remove unused import.
This commit is contained in:
@ -47,10 +47,10 @@ where
|
||||
A: fmt::Debug + std::error::Error,
|
||||
B: fmt::Debug + std::error::Error
|
||||
{
|
||||
fn cause(&self) -> Option<&dyn std::error::Error> {
|
||||
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
|
||||
match self {
|
||||
EitherError::A(a) => a.cause(),
|
||||
EitherError::B(b) => b.cause()
|
||||
EitherError::A(a) => a.source(),
|
||||
EitherError::B(b) => b.source()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user