Skip to content

Commit 99ea407

Browse files
RuoqingHeandreeaflorescu
authored andcommitted
clippy: Fix unnecessary_map_or
Fix `unnecessary_map_or` reported by rust toolchain 1.85.0. Signed-off-by: Ruoqing He <[email protected]>
1 parent 125acf8 commit 99ea407

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

kvm-ioctls/src/ioctls/vcpu.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3584,12 +3584,12 @@ mod tests {
35843584
.as_slice()
35853585
.iter()
35863586
.find(|entry| entry.function == 1)
3587-
.map_or(false, |entry| entry.ecx & (1 << 5) != 0);
3587+
.is_some_and(|entry| entry.ecx & (1 << 5) != 0);
35883588
let supports_vmmcall = cpuid
35893589
.as_slice()
35903590
.iter()
35913591
.find(|entry| entry.function == 0x8000_0001)
3592-
.map_or(false, |entry| entry.ecx & (1 << 2) != 0);
3592+
.is_some_and(|entry| entry.ecx & (1 << 2) != 0);
35933593
#[rustfmt::skip]
35943594
let code = if supports_vmcall {
35953595
[

0 commit comments

Comments
 (0)