mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-28 02:48:03 +00:00
Clean up sc-network (#9761)
* Clean up sc-network - Avoid using clone() for the Copy type `PeerId`. - Use `find_map` for `filter_map` and `next`. - Use `Self`. * More on Copy types * Cargo +nightly fmt --all * More .. * fmt * Revert vec![default_notif_handshake_message]
This commit is contained in:
@@ -79,12 +79,12 @@ impl fmt::Debug for Error {
|
||||
impl std::error::Error for Error {
|
||||
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
|
||||
match self {
|
||||
Error::Io(ref err) => Some(err),
|
||||
Error::Client(ref err) => Some(err),
|
||||
Error::DuplicateBootnode { .. } => None,
|
||||
Error::Prometheus(ref err) => Some(err),
|
||||
Error::AddressesForAnotherTransport { .. } => None,
|
||||
Error::DuplicateRequestResponseProtocol { .. } => None,
|
||||
Self::Io(ref err) => Some(err),
|
||||
Self::Client(ref err) => Some(err),
|
||||
Self::Prometheus(ref err) => Some(err),
|
||||
Self::DuplicateBootnode { .. } |
|
||||
Self::AddressesForAnotherTransport { .. } |
|
||||
Self::DuplicateRequestResponseProtocol { .. } => None,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user