Rust 1.86.0 lints (#7254)

Implement lints for the new Rust compiler version 1.86.0.
This commit is contained in:
Mac L
2025-04-04 13:30:22 +11:00
committed by GitHub
parent 0850bcfb89
commit 82d1674455
25 changed files with 52 additions and 52 deletions

View File

@@ -155,7 +155,7 @@ impl<E: EthSpec> PeerDB<E> {
matches!(
self.connection_status(peer_id),
Some(PeerConnectionStatus::Disconnected { .. })
| Some(PeerConnectionStatus::Unknown { .. })
| Some(PeerConnectionStatus::Unknown)
| None
) && !self.score_state_banned_or_disconnected(peer_id)
}
@@ -776,8 +776,8 @@ impl<E: EthSpec> PeerDB<E> {
NewConnectionState::Connected { .. } // We have established a new connection (peer may not have been seen before)
| NewConnectionState::Disconnecting { .. }// We are disconnecting from a peer that may not have been registered before
| NewConnectionState::Dialing { .. } // We are dialing a potentially new peer
| NewConnectionState::Disconnected { .. } // Dialing a peer that responds by a different ID can be immediately
// disconnected without having being stored in the db before
| NewConnectionState::Disconnected // Dialing a peer that responds by a different ID can be immediately
// disconnected without having being stored in the db before
) {
warn!(log_ref, "Updating state of unknown peer";
"peer_id" => %peer_id, "new_state" => ?new_state);