add a few more lints (#8574)

This commit is contained in:
Thomas Coratger
2024-06-03 22:32:02 +02:00
committed by GitHub
parent 2b4fa96065
commit 279183d718
3 changed files with 8 additions and 4 deletions

View File

@ -163,6 +163,12 @@ string_lit_as_bytes = "warn"
explicit_into_iter_loop = "warn" explicit_into_iter_loop = "warn"
explicit_iter_loop = "warn" explicit_iter_loop = "warn"
type_repetition_in_bounds = "warn" type_repetition_in_bounds = "warn"
manual_string_new = "warn"
naive_bytecount = "warn"
needless_bitwise_bool = "warn"
zero_sized_map_values = "warn"
single_char_pattern = "warn"
needless_continue = "warn"
# These are nursery lints which have findings. Allow them for now. Some are not # These are nursery lints which have findings. Allow them for now. Some are not
# quite mature enough for use in our codebase and some we don't really want. # quite mature enough for use in our codebase and some we don't really want.

View File

@ -883,10 +883,8 @@ impl PeersManager {
for peer_id in unbanned_peers { for peer_id in unbanned_peers {
if let Some(peer) = self.peers.get_mut(&peer_id) { if let Some(peer) = self.peers.get_mut(&peer_id) {
peer.unban(); peer.unban();
} else { self.queued_actions.push_back(PeerAction::UnBanPeer { peer_id });
continue
} }
self.queued_actions.push_back(PeerAction::UnBanPeer { peer_id });
} }
// clear the backoff list of expired backoffs, and mark the relevant peers as // clear the backoff list of expired backoffs, and mark the relevant peers as

View File

@ -159,7 +159,7 @@ impl Default for LayerInfo {
Self { Self {
format: LogFormat::Terminal, format: LogFormat::Terminal,
default_directive: LevelFilter::INFO.to_string(), default_directive: LevelFilter::INFO.to_string(),
filters: "".to_string(), filters: String::new(),
color: Some("always".to_string()), color: Some("always".to_string()),
} }
} }