Skip to content

Commit a3adb4d

Browse files
authored
Merge branch 'main' into main
2 parents 34018e5 + d539be9 commit a3adb4d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

vhost/src/vhost_kern/mod.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,19 +78,19 @@ pub trait VhostKernBackend: AsRawFd {
7878
let used_ring_size = 6 + 8 * u64::from(queue_size) as GuestUsize;
7979
if GuestAddress(config_data.desc_table_addr)
8080
.checked_add(desc_table_size)
81-
.map_or(true, |v| !m.address_in_range(v))
81+
.is_none_or(|v| !m.address_in_range(v))
8282
{
8383
return false;
8484
}
8585
if GuestAddress(config_data.avail_ring_addr)
8686
.checked_add(avail_ring_size)
87-
.map_or(true, |v| !m.address_in_range(v))
87+
.is_none_or(|v| !m.address_in_range(v))
8888
{
8989
return false;
9090
}
9191
if GuestAddress(config_data.used_ring_addr)
9292
.checked_add(used_ring_size)
93-
.map_or(true, |v| !m.address_in_range(v))
93+
.is_none_or(|v| !m.address_in_range(v))
9494
{
9595
return false;
9696
}

0 commit comments

Comments
 (0)