fix(fileio): satisfy decompression ABI lint
Use the pointer-width bit count for the decompression callback projection assertion so the Rust archive remains clean under warnings-as-errors Clippy. The assertion keeps the same byte offset on supported targets. Test Plan: - ulimit -v 41943040; CARGO_BUILD_JOBS=1 cargo fmt --manifest-path rust/Cargo.toml --all -- --check - ulimit -v 41943040; CARGO_BUILD_JOBS=1 cargo clippy --manifest-path rust/Cargo.toml --all-targets -- -D warnings
This commit is contained in:
@@ -631,7 +631,7 @@ const _: () = {
|
||||
);
|
||||
assert!(
|
||||
std::mem::offset_of!(FIO_rust_decompress_file_projection_t, decompress)
|
||||
== FIO_RUST_DECOMPRESS_FILE_CALLBACK_OFFSET + 8 * size_of::<usize>()
|
||||
== FIO_RUST_DECOMPRESS_FILE_CALLBACK_OFFSET + usize::BITS as usize
|
||||
);
|
||||
assert!(
|
||||
std::mem::offset_of!(FIO_rust_decompress_file_projection_t, clear_handler)
|
||||
|
||||
Reference in New Issue
Block a user