Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rust 1.83.0 clippy fixes #254

Merged
merged 1 commit into from
Dec 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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