From 53218c5537842ef405ec9abebb093daf5434e06b Mon Sep 17 00:00:00 2001 From: ddidderr Date: Mon, 20 Jul 2026 04:16:54 +0200 Subject: [PATCH] fix(cli): use div_ceil for list ABI test The Rust CLI clippy gate treats the hand-written alignment rounding in the multi-file list projection layout test as a manual div-ceil implementation. Use the standard integer operation so the test remains clear, equivalent, and warning-free under the repository's deny-warnings policy. Test Plan: - `cargo fmt --manifest-path rust/cli/Cargo.toml --all` -- passed - `ulimit -v 41943040; CARGO_BUILD_JOBS=1 cargo clippy --manifest-path rust/cli/Cargo.toml --all-targets -- -D warnings` -- passed --- rust/src/fileio_prefs.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/rust/src/fileio_prefs.rs b/rust/src/fileio_prefs.rs index 6d6b63e97..7e24e5805 100644 --- a/rust/src/fileio_prefs.rs +++ b/rust/src/fileio_prefs.rs @@ -2631,9 +2631,8 @@ mod tests { let callback = size_of::>(); let projection_alignment = align_of::(); let projection_payload = 2 * size_of::() + 4 * size_of::() + size_of::(); - let projection_size = (projection_payload + projection_alignment - 1) - / projection_alignment - * projection_alignment; + let projection_size = + projection_payload.div_ceil(projection_alignment) * projection_alignment; assert_eq!( align_of::(),