misc: Replace map_or on false with is_some_and

Replace `map_or()` on false condition with `is_some_and` to provide
better readability, as suggestted by v1.84.0-beta.1 `cargo clippy`.

Signed-off-by: Ruoqing He <heruoqing@iscas.ac.cn>
This commit is contained in:
Ruoqing He
2024-11-29 18:14:49 +08:00
committed by Rob Bradford
parent 7e419784cd
commit ab7b294688
5 changed files with 12 additions and 16 deletions

View File

@@ -468,7 +468,7 @@ impl NetQueuePair {
let rate_limit_reached = self
.rx_rate_limiter
.as_ref()
.map_or(false, |r| r.is_blocked());
.is_some_and(|r| r.is_blocked());
// Stop listening on the `RX_TAP_EVENT` when:
// 1) there is no available describes, or