-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Compile on rust 1.61, resolve warnings, fix some lints (#12)
* Fix getopts version The pinned version does not compile anymore because of mutable aliasing: * rust-lang/getopts#61 * rust-lang/getopts#110 This was achieved by temporarily setting the getopts version to "0.2.21" in Cargo.toml, and running `cargo check`. Note that this also converts the Cargo.lock to a new format. * Fix warning: Instead of deprecated macro try!, use question mark operator * Fix warning: Avoid anonymous parameters * Fix warning: Use dyn on trait objects * Fix warning: Avoid unneeded mutability * Fix warning: Avoid redundant format in panic or assert * Fix lint: Avoid redundant field names in initializers * Fix lint: Avoid redundant clone * Fix lint: Avoid literal cast * Fix lint: Collapse if/else where applicable I left some if/else branches in place, if there was a certain symmetry between the branches. * Fix lint: Avoid needless borrow I left some if/else branches in place, if there was a certain symmetry between the branches. * Fix lint: Use cloned instead of custom closure * Fix lint: Avoid unneeded trait bound * Fix lint: Avoid unneeded trait bound (2) avoid redundant clone * Fix lint: Use &[T] instead of &Vec<T> * Fix lint: Avoid & on each pattern * Fix lint: Avoid manual assign * Fix lint: Use implicit return * Fix lint: Merge if/else branches with same value I left one complicated branch in place. * Fix lint: Use is_empty instead of comparing len against 0 * Fix lint: Use sum instead of fold * Fix lint: Avoid clone on Copy types
- Loading branch information
Showing
10 changed files
with
198 additions
and
204 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
Oops, something went wrong.