You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Our CI is being upgraded to Rust 1.85 and this will produce new warnings
from clippy like this one:
error: this `map_or` can be simplified
--> virtio-queue/src/queue.rs:313:19
|
313 | } else if desc_table
| ___________________^
314 | | .checked_add(desc_table_size)
315 | | .map_or(true, |v| !mem.address_in_range(v))
| |_______________________________________________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or
= note: `-D clippy::unnecessary-map-or` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(clippy::unnecessary_map_or)]`
help: use is_none_or instead
|
313 ~ } else if desc_table
314 + .checked_add(desc_table_size).is_none_or(|v| !mem.address_in_range(v))
Apply the advice using `cargo clippy --fix`.
Signed-off-by: Stefano Garzarella <sgarzare@redhat.com>
0 commit comments