mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
misc: Fix beta clippy errors
Fix clippy error: "error: manual implementation of `.is_multiple_of() `" from rustc 1.90.0-beta.1 (788da80fc 2025-08-04). Signed-off-by: Songqian Li <sionli@tencent.com>
This commit is contained in:
@@ -264,7 +264,7 @@ impl MemoryRangeTable {
|
||||
}
|
||||
|
||||
pub fn read_from(fd: &mut dyn Read, length: u64) -> Result<MemoryRangeTable, MigratableError> {
|
||||
assert!(length as usize % std::mem::size_of::<MemoryRange>() == 0);
|
||||
assert!((length as usize).is_multiple_of(size_of::<MemoryRange>()));
|
||||
|
||||
let mut data: Vec<MemoryRange> = Vec::new();
|
||||
data.resize_with(
|
||||
|
||||
Reference in New Issue
Block a user