From 9a84d12ff4c7d9d7b1d19be1a1c76b619eebf29c Mon Sep 17 00:00:00 2001 From: Chris Oo Date: Mon, 9 Feb 2026 16:17:19 -0800 Subject: [PATCH] clippy: resolve newer clippy lints --- .github/workflows/rust.yml | 2 +- igvm/src/lib.rs | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 28aa99e..a134cbe 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -11,7 +11,7 @@ on: env: CARGO_TERM_COLOR: always - RUST_TOOLCHAIN: 1.86.0 + RUST_TOOLCHAIN: 1.93.0 jobs: build: diff --git a/igvm/src/lib.rs b/igvm/src/lib.rs index 9a52865..aabd9ea 100644 --- a/igvm/src/lib.rs +++ b/igvm/src/lib.rs @@ -126,7 +126,7 @@ fn append_header( variable_headers.extend_from_slice(header); variable_headers.extend(align_up_iter); - debug_assert!(variable_headers.len() % 8 == 0); + debug_assert!(variable_headers.len().is_multiple_of(8)); } /// The serializer for headers with file data. This serializer deduplicates data @@ -1635,7 +1635,7 @@ impl IgvmDirectiveHeader { return Err(BinaryHeaderError::UnalignedAddress(*gpa)); } - if *number_of_bytes as u64 % PAGE_SIZE_4K != 0 { + if !(*number_of_bytes as u64).is_multiple_of(PAGE_SIZE_4K) { return Err(BinaryHeaderError::UnalignedSize(*number_of_bytes as u64)); } } @@ -2219,7 +2219,7 @@ impl IgvmRelocatableRegion { let start = relocation_base; let end = relocation_base + self.size; - if start % self.relocation_alignment != 0 { + if !start.is_multiple_of(self.relocation_alignment) { tracing::debug!("base is not aligned"); false } else if start < self.minimum_relocation_gpa {