diff --git a/rust/src/zstd_compress.rs b/rust/src/zstd_compress.rs index 79bfc94c4..125411b8c 100644 --- a/rust/src/zstd_compress.rs +++ b/rust/src/zstd_compress.rs @@ -278,9 +278,7 @@ pub struct ZSTD_rust_compressStream2ResultPolicyState { const _: () = { assert!(size_of::>() == size_of::()); - assert!( - offset_of!(ZSTD_rust_compressStream2ResultPolicyState, callback_context) == 0 - ); + assert!(offset_of!(ZSTD_rust_compressStream2ResultPolicyState, callback_context) == 0); assert!( offset_of!( ZSTD_rust_compressStream2ResultPolicyState, @@ -288,12 +286,10 @@ const _: () = { ) == size_of::() ); assert!( - offset_of!(ZSTD_rust_compressStream2ResultPolicyState, output) - == 2 * size_of::() + offset_of!(ZSTD_rust_compressStream2ResultPolicyState, output) == 2 * size_of::() ); assert!( - offset_of!(ZSTD_rust_compressStream2ResultPolicyState, input) - == 3 * size_of::() + offset_of!(ZSTD_rust_compressStream2ResultPolicyState, input) == 3 * size_of::() ); assert!( offset_of!(ZSTD_rust_compressStream2ResultPolicyState, compress_result) @@ -311,9 +307,7 @@ const _: () = { out_buff_flushed_size ) == 6 * size_of::() ); - assert!( - size_of::() == 7 * size_of::() - ); + assert!(size_of::() == 7 * size_of::()); }; #[inline] @@ -14548,10 +14542,7 @@ mod tests { out_buff_flushed_size: 5, }; - assert_eq!( - unsafe { ZSTD_rust_compressStream2ResultPolicy(&state) }, - 12 - ); + assert_eq!(unsafe { ZSTD_rust_compressStream2ResultPolicy(&state) }, 12); assert_eq!(context.set_buffer_expectations_calls, 1); } diff --git a/rust/src/zstdmt_compress.rs b/rust/src/zstdmt_compress.rs index ddd5e365f..0797904a3 100644 --- a/rust/src/zstdmt_compress.rs +++ b/rust/src/zstdmt_compress.rs @@ -1705,10 +1705,7 @@ pub struct ZSTDMT_tryGetInputRangeResult { const _: () = { assert!(offset_of!(ZSTDMT_tryGetInputRangeResult, ready) == 0); assert!(offset_of!(ZSTDMT_tryGetInputRangeResult, movePrefix) == size_of::()); - assert!( - offset_of!(ZSTDMT_tryGetInputRangeResult, bufferStart) - == 2 * size_of::() - ); + assert!(offset_of!(ZSTDMT_tryGetInputRangeResult, bufferStart) == 2 * size_of::()); assert!( offset_of!(ZSTDMT_tryGetInputRangeResult, bufferCapacity) == 2 * size_of::() + size_of::<*mut c_void>() @@ -1723,11 +1720,8 @@ const _: () = { ); }; -pub type ZSTDMT_inputRangeWaitFn = unsafe extern "C" fn( - opaque: *mut c_void, - buffer_start: *mut c_void, - buffer_capacity: usize, -); +pub type ZSTDMT_inputRangeWaitFn = + unsafe extern "C" fn(opaque: *mut c_void, buffer_start: *mut c_void, buffer_capacity: usize); pub type ZSTDMT_inputRangeMovePrefixFn = unsafe extern "C" fn( opaque: *mut c_void, destination: *mut c_void, @@ -1735,11 +1729,8 @@ pub type ZSTDMT_inputRangeMovePrefixFn = unsafe extern "C" fn( size: usize, round_buffer_pos: usize, ); -pub type ZSTDMT_inputRangePublishBufferFn = unsafe extern "C" fn( - opaque: *mut c_void, - buffer_start: *mut c_void, - buffer_capacity: usize, -); +pub type ZSTDMT_inputRangePublishBufferFn = + unsafe extern "C" fn(opaque: *mut c_void, buffer_start: *mut c_void, buffer_capacity: usize); #[inline] fn commit_input_range_with( @@ -9102,11 +9093,7 @@ mod tests { assert_eq!(size, prefix.len()); assert_eq!(round_buffer_pos, prefix.len()); unsafe { - ptr::copy_nonoverlapping( - source.cast::(), - destination.cast::(), - size, - ); + ptr::copy_nonoverlapping(source.cast::(), destination.cast::(), size); } move_events.borrow_mut().push("move"); },