rust-lang / flate2-rs

DEFLATE, gzip, and zlib bindings for Rust
https://docs.rs/flate2
Apache License 2.0
891 stars 158 forks source link

Make Clippy happier, minor cleanups #283

Closed nyurik closed 2 years ago

nyurik commented 2 years ago

I ran cargo clippy and addressed some issues it raised, while leaving other issues for another time. Hopefully this will make this code a bit easier for newcomers to read.

Biggest changes:

Also, fixed two ffi::uInt::max_value()ffi::uInt::MAX due to deprecation.

Biggest TODOs (please give feedback if they should be fixed too):

nyurik commented 2 years ago

@alexcrichton thx for merging! Do you have any thoughts about the TODO in the comment?

alexcrichton commented 2 years ago

Sorry no, I can perhaps offer my thoughts on a case-by-case basis but I don't run clippy myself.