From 1530b4bf4f631e80e3c237f75abc2c6ca85e041c Mon Sep 17 00:00:00 2001 From: ddidderr Date: Tue, 21 Jul 2026 11:43:48 +0200 Subject: [PATCH] style(cli): use div ceil for adaptive ABI alignment Clippy rejects the hand-written round-up expression used to compute the callback-alignment offset in the Rust file-I/O projection. Use the equivalent div_ceil spelling so the ABI assertion remains clear and the root Rust targets pass with warnings denied. Test Plan: - cargo +nightly fmt --manifest-path rust/Cargo.toml --all -- --check - git diff --check - ulimit -v 41943040; CARGO_BUILD_JOBS=1 cargo clippy --manifest-path rust/Cargo.toml --all-targets -- -D warnings --- rust/src/fileio_asyncio.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/rust/src/fileio_asyncio.rs b/rust/src/fileio_asyncio.rs index cd4a7477f..a9e7d2ff2 100644 --- a/rust/src/fileio_asyncio.rs +++ b/rust/src/fileio_asyncio.rs @@ -1104,9 +1104,8 @@ pub struct FIO_rust_zstd_compress_projection_t { pub adaptive_diagnostic: Option, } const _: () = { - let callback_offset = (14 * size_of::() + 5 * size_of::() + size_of::() - - 1) - / size_of::() + let callback_offset = (14 * size_of::() + 5 * size_of::()) + .div_ceil(size_of::()) * size_of::(); assert!( std::mem::offset_of!(FIO_rust_zstd_compress_projection_t, adaptive_mode)