Rust 1.85 lints (#7019)

N/A


  2 changes:
1. Replace Option::map_or(true, ...) with is_none_or(...)
2. Remove unnecessary `Into::into` blocks where the type conversion is apparent from the types
This commit is contained in:
Pawan Dhananjay
2025-02-23 18:36:13 -08:00
committed by GitHub
parent ff739d56be
commit b3b6aea1c5
33 changed files with 102 additions and 128 deletions

View File

@@ -2450,8 +2450,8 @@ impl ApiTester {
};
let state_match =
states.map_or(true, |states| states.contains(&PeerState::Connected));
let dir_match = dirs.map_or(true, |dirs| dirs.contains(&PeerDirection::Inbound));
states.is_none_or(|states| states.contains(&PeerState::Connected));
let dir_match = dirs.is_none_or(|dirs| dirs.contains(&PeerDirection::Inbound));
let mut expected_peers = Vec::new();
if state_match && dir_match {