Skip to content

Commit 8d129d1

Browse files
committed
Clippy: semicolon_if_nothing_returned to fix statements with missing semicolons.
1 parent d654444 commit 8d129d1

14 files changed

Lines changed: 26 additions & 26 deletions

File tree

lib/common/allocations.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ pub(crate) unsafe fn ZSTD_customFree(
7373
cfg_select! {
7474
feature = "rust-allocator" => {
7575
let layout = core::alloc::Layout::from_size_align_unchecked(_size, 16);
76-
std::alloc::dealloc(ptr.cast(), layout)
76+
std::alloc::dealloc(ptr.cast(), layout);
7777
}
7878
feature = "c-allocator" => {
7979
libc::free(ptr);

lib/common/mem.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,15 +35,15 @@ pub(crate) unsafe fn MEM_readST(ptr: *const c_void) -> size_t {
3535

3636
#[inline]
3737
pub(crate) unsafe fn MEM_write16(memPtr: *mut c_void, value: u16) {
38-
memPtr.cast::<u16>().write_unaligned(value)
38+
memPtr.cast::<u16>().write_unaligned(value);
3939
}
4040
#[inline]
4141
pub(crate) unsafe fn MEM_write32(memPtr: *mut c_void, value: u32) {
42-
memPtr.cast::<u32>().write_unaligned(value)
42+
memPtr.cast::<u32>().write_unaligned(value);
4343
}
4444
#[inline]
4545
pub(crate) unsafe fn MEM_write64(memPtr: *mut c_void, value: u64) {
46-
memPtr.cast::<u64>().write_unaligned(value)
46+
memPtr.cast::<u64>().write_unaligned(value);
4747
}
4848

4949
#[inline]

lib/common/pool.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ pub(crate) unsafe fn POOL_create_advanced(
110110
(*ctx.0).threads.add(i),
111111
std::thread::spawn(|| {
112112
let ctx = ctx;
113-
POOL_thread(ctx.0)
113+
POOL_thread(ctx.0);
114114
}),
115115
);
116116
}
@@ -203,7 +203,7 @@ unsafe fn POOL_resize_internal(ctx: *mut POOL_ctx, numThreads: size_t) -> core::
203203
((*ctx.0).threads).add(threadId),
204204
std::thread::spawn(|| {
205205
let ctx = ctx;
206-
POOL_thread(ctx.0)
206+
POOL_thread(ctx.0);
207207
}),
208208
);
209209
}

lib/common/xxhash.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ pub unsafe fn ZSTD_XXH64(input: *const core::ffi::c_void, len: usize, seed: u64)
155155
}
156156

157157
pub(crate) fn ZSTD_XXH64_reset(state: &mut XXH64_state_t, seed: u64) {
158-
state.reset(seed)
158+
state.reset(seed);
159159
}
160160

161161
pub(crate) fn ZSTD_XXH64_update_slice(state: &mut XXH64_state_t, mut slice: &[u8]) {

lib/common/zstd_internal.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ pub(crate) unsafe fn ZSTD_copy16(dst: *mut u8, src: *const u8) {
7373
// be located within the dst buffer. In circumstances where the op "catches up" to where the
7474
// literal buffer is, there can be partial overlaps in this call on the final
7575
// copy if the literal is being shifted by less than 16 bytes.
76-
core::ptr::copy(src, dst, 16)
76+
core::ptr::copy(src, dst, 16);
7777
}
7878

7979
pub(crate) const WILDCOPY_OVERLENGTH: usize = 32;

lib/compress/zstd_compress.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3788,7 +3788,7 @@ pub unsafe extern "C" fn ZSTD_getFrameProgression(cctx: *const ZSTD_CCtx) -> ZST
37883788
};
37893789

37903790
if buffered != 0 {
3791-
assert!((*cctx).inBuffPos >= (*cctx).inToCompress)
3791+
assert!((*cctx).inBuffPos >= (*cctx).inToCompress);
37923792
}
37933793
assert!(buffered <= ZSTD_BLOCKSIZE_MAX as usize);
37943794

lib/compress/zstd_compress_literals.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,7 @@ pub unsafe fn ZSTD_compressLiterals(
284284
match lhSize {
285285
3 => {
286286
if singleStream == 0 {
287-
assert!(srcSize >= MIN_LITERALS_FOR_4_STREAMS)
287+
assert!(srcSize >= MIN_LITERALS_FOR_4_STREAMS);
288288
}
289289

290290
let lhc = (hType as core::ffi::c_uint)

lib/decompress/zstd_decompress.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,7 @@ fn find_frame_size_info_legacy(src: &[u8]) -> Result<ZSTD_frameSizeInfo, Error>
279279
src.len(),
280280
&mut frameSizeInfo.compressedSize,
281281
&mut frameSizeInfo.decompressedBound,
282-
)
282+
);
283283
},
284284
7 => {
285285
ZSTDv07_findFrameSizeInfoLegacy(
@@ -1641,7 +1641,7 @@ fn decompression_margin(mut src: &[u8]) -> Result<size_t, Error> {
16411641
margin += zfh.headerSize as size_t;
16421642
margin += if zfh.checksumFlag != 0 { 4 } else { 0 };
16431643
margin += 3 * frameSizeInfo.nbBlocks;
1644-
maxBlockSize = Ord::max(maxBlockSize, zfh.blockSizeMax)
1644+
maxBlockSize = Ord::max(maxBlockSize, zfh.blockSizeMax);
16451645
} else {
16461646
debug_assert!(zfh.frameType == ZSTD_skippableFrame);
16471647
// add the entire skippable frame size to our margin.
@@ -1931,7 +1931,7 @@ unsafe fn ZSTD_decompressMultiFrame<'a>(
19311931

19321932
if let Some(ddict) = ddict {
19331933
Error::from_error_code(ZSTD_decompressBegin_usingDDict(dctx, ddict))
1934-
.map_or(Ok(()), Err)?
1934+
.map_or(Ok(()), Err)?;
19351935
} else {
19361936
// this will initialize correctly with no dict if `dict == NULL`, so
19371937
// use this in all cases but for ddict

lib/decompress/zstd_decompress_block.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -336,7 +336,7 @@ fn ZSTD_decodeLiteralsBlock(
336336
let len = litSize - ZSTD_LITBUFFEREXTRASIZE;
337337
let src = &src[lhSize..][..len];
338338

339-
core::ptr::copy_nonoverlapping(src.as_ptr(), dctx.litBuffer, len)
339+
core::ptr::copy_nonoverlapping(src.as_ptr(), dctx.litBuffer, len);
340340
};
341341

342342
dctx.litExtraBuffer[..ZSTD_LITBUFFEREXTRASIZE].copy_from_slice(
@@ -347,7 +347,7 @@ fn ZSTD_decodeLiteralsBlock(
347347
unsafe {
348348
let src = &src[lhSize..][..litSize];
349349

350-
core::ptr::copy_nonoverlapping(src.as_ptr(), dctx.litBuffer, litSize)
350+
core::ptr::copy_nonoverlapping(src.as_ptr(), dctx.litBuffer, litSize);
351351
};
352352
}
353353
dctx.litPtr = dctx.litBuffer;
@@ -401,7 +401,7 @@ fn ZSTD_decodeLiteralsBlock(
401401
dctx.litBuffer,
402402
src[lhSize],
403403
litSize - ZSTD_LITBUFFEREXTRASIZE,
404-
)
404+
);
405405
};
406406

407407
dctx.litExtraBuffer[..ZSTD_LITBUFFEREXTRASIZE].fill(src[lhSize]);
@@ -1812,7 +1812,7 @@ fn ZSTD_decompressSequences_bodySplitLitBuffer(
18121812
"nop",
18131813
".p2align 3",
18141814
options(preserves_flags)
1815-
)
1815+
);
18161816
}
18171817
}
18181818

@@ -1971,7 +1971,7 @@ fn prefetch_area<T>(ptr: *const T, bytes: usize) {
19711971

19721972
#[inline(always)]
19731973
fn prefetch_val<T>(ptr: *const T) {
1974-
prefetch_area(ptr, size_of::<T>())
1974+
prefetch_area(ptr, size_of::<T>());
19751975
}
19761976

19771977
#[inline(always)]

lib/dictBuilder/cover.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1068,7 +1068,7 @@ pub(super) fn COVER_dictSelectionIsError(selection: &COVER_dictSelection_t) -> b
10681068
}
10691069

10701070
pub(super) fn COVER_dictSelectionFree(selection: COVER_dictSelection_t) {
1071-
drop(selection)
1071+
drop(selection);
10721072
}
10731073

10741074
pub(super) fn COVER_selectDict(
@@ -1181,7 +1181,7 @@ pub(super) fn COVER_selectDict(
11811181
}
11821182

11831183
unsafe fn COVER_tryParameters_wrapper(opaque: *mut core::ffi::c_void) {
1184-
COVER_tryParameters(unsafe { Box::from_raw(opaque.cast()) })
1184+
COVER_tryParameters(unsafe { Box::from_raw(opaque.cast()) });
11851185
}
11861186

11871187
fn COVER_tryParameters(data: Box<COVER_tryParameters_data_t>) {

0 commit comments

Comments
 (0)