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:
@@ -68,7 +68,7 @@ impl AddressAllocator {
|
||||
}
|
||||
|
||||
fn align_address(&self, address: GuestAddress, alignment: GuestUsize) -> GuestAddress {
|
||||
let align_adjust = if address.raw_value() % alignment != 0 {
|
||||
let align_adjust = if !address.raw_value().is_multiple_of(alignment) {
|
||||
alignment - (address.raw_value() % alignment)
|
||||
} else {
|
||||
0
|
||||
|
||||
Reference in New Issue
Block a user