Skip to content

Commit

Permalink
Merge pull request #254 from trifectatechfoundation/1.83.0-clippy
Browse files Browse the repository at this point in the history
rust 1.83.0 clippy fixes
  • Loading branch information
bjorn3 authored Dec 2, 2024
2 parents b1b4d20 + ef8c80f commit ed9e800
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 10 deletions.
7 changes: 1 addition & 6 deletions libz-rs-sys/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1351,9 +1351,8 @@ pub unsafe extern "C-unwind" fn deflateCopy(dest: z_streamp, source: z_streamp)
/// - level `1` gives best speed
/// - level `9` gives best compression
/// - [`Z_DEFAULT_COMPRESSION`] requests a default compromise between speed and compression (currently equivalent to level `6`).
///
/// A call to [`inflateInit_`] is equivalent to [`inflateInit2_`] where
/// A call to [`deflateInit_`] is equivalent to [`deflateInit2_`] where:
///
/// - `method` is `8` (deflate)
/// - `windowBits` is `15`
Expand Down Expand Up @@ -1441,10 +1440,6 @@ pub unsafe extern "C-unwind" fn deflateInit_(
/// - level `1` gives best speed
/// - level `9` gives best compression
/// - [`Z_DEFAULT_COMPRESSION`] requests a default compromise between speed and compression (currently equivalent to level `6`).
///
/// A call to [`inflateInit_`] is equivalent to [`inflateInit2_`] where
///
///
/// # Returns
///
Expand Down
2 changes: 1 addition & 1 deletion zlib-rs/src/adler32/generic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ pub fn adler32_rust(mut adler: u32, buf: &[u8]) -> u32 {
}

/* do remaining bytes (less than NMAX, still just one modulo) */
return adler32_len_64(adler, it.remainder(), sum2);
adler32_len_64(adler, it.remainder(), sum2)
}

pub(crate) fn adler32_len_1(mut adler: u32, buf: &[u8], mut sum2: u32) -> u32 {
Expand Down
2 changes: 1 addition & 1 deletion zlib-rs/src/allocate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ impl Allocator<'static> {
};
}

impl<'a> Allocator<'a> {
impl Allocator<'_> {
pub fn allocate_layout(&self, layout: Layout) -> *mut c_void {
// Special case for the Rust `alloc` backed allocator
#[cfg(feature = "rust-allocator")]
Expand Down
2 changes: 1 addition & 1 deletion zlib-rs/src/deflate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2859,7 +2859,7 @@ const fn compress_bound_help(source_len: usize, wrap_len: usize) -> usize {
}

/// heap used to build the Huffman trees
///
/// The sons of heap[n] are heap[2*n] and heap[2*n+1]. heap[0] is not used.
/// The same heap array is used to build all trees.
#[derive(Clone)]
Expand Down
2 changes: 1 addition & 1 deletion zlib-rs/src/inflate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -516,7 +516,7 @@ const fn zswap32(q: u32) -> u32 {
const INFLATE_FAST_MIN_HAVE: usize = 15;
const INFLATE_FAST_MIN_LEFT: usize = 260;

impl<'a> State<'a> {
impl State<'_> {
fn dispatch(&mut self) -> ReturnCode {
'label: loop {
match self.mode {
Expand Down

0 comments on commit ed9e800

Please sign in to comment.