forked from rust-lang/flate2-rs
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make Clippy happier, minor cleanups (rust-lang#283)
* Make Clippy happier, minor cleanups 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: * `foo.len() > 0` ➡ `!foo.is_empty()` * `return x;` ➡ `x` * `{ foo: foo }` ➡ `{ foo }` * adding a few `Default` trait implementations * some `match` statement cleanup Also, fixed two `ffi::uInt::max_value()` ➡ `ffi::uInt::MAX` due to deprecation. Biggest TODOs (please give feedback if they should be fixed too): * Clippy has complained about many `foo >> 0` -- which is a noop that might confuse (?) * some other corner cases that I don't know enough about * cargo fmt
- Loading branch information
Showing
8 changed files
with
50 additions
and
60 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters