diff --git a/rust/src/zstd_compress.rs b/rust/src/zstd_compress.rs index 42599eced..73dafab93 100644 --- a/rust/src/zstd_compress.rs +++ b/rust/src/zstd_compress.rs @@ -2401,7 +2401,7 @@ const _: () = { assert!(offset_of!(ZSTD_rust_initStaticCCtxState, reserve_object) == 5 * size_of::()); assert!(offset_of!(ZSTD_rust_initStaticCCtxState, zero) == 6 * size_of::()); assert!(offset_of!(ZSTD_rust_initStaticCCtxState, move_workspace) == 7 * size_of::()); - assert!(offset_of!(ZSTD_rust_initStaticCCtxState, check_available) == 8 * size_of::()); + assert!(offset_of!(ZSTD_rust_initStaticCCtxState, check_available) == usize::BITS as usize); assert!( offset_of!(ZSTD_rust_initStaticCCtxState, reserve_block_state) == 9 * size_of::() ); diff --git a/rust/src/zstdmt_compress.rs b/rust/src/zstdmt_compress.rs index 89c1d85e2..6999a0ea2 100644 --- a/rust/src/zstdmt_compress.rs +++ b/rust/src/zstdmt_compress.rs @@ -310,7 +310,7 @@ const _: () = { offset_of!(ZSTDMT_compressionJobFinishProjection, publishConsumed) == 7 * size_of::() ); - assert!(offset_of!(ZSTDMT_compressionJobFinishProjection, signal) == 8 * size_of::()); + assert!(offset_of!(ZSTDMT_compressionJobFinishProjection, signal) == usize::BITS as usize); assert!(size_of::() == 9 * size_of::()); }; @@ -5487,7 +5487,7 @@ mod tests { || panic!("resource failure must skip context initialization"), || panic!("resource failure must skip sequence application"), || panic!("resource failure must skip frame-header writing"), - || panic!("resource failure must skip compression"), + |_| panic!("resource failure must skip compression"), || panic!("resource failure must skip tracing"), );