-
Notifications
You must be signed in to change notification settings - Fork 13k
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
Rewrote extra::getopts to use methods #9267
Conversation
target: opt_str2(getopts::opt_maybe_str(matches, "target")).to_str(), | ||
adb_path: opt_str2(getopts::opt_maybe_str(matches, "adb-path")).to_str(), | ||
matches.opt_maybe_str("ratchet-noise-percent").map_move(|s| | ||
f64::from_str(s).unwrap()), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
f64::from_str
is disappearing in #9275, so if this could change to from_str(s).unwrap()
it'd save at least one rebase. (Also, this could be .and_then(from_str)
right?)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed it to and_then
, re-testing right now. Any other lines like this?
Don't r+ yet, still rewriting a few things in the documentation Ready now. |
use std::vec; | ||
|
||
/// Name of an option. Either an string or a single char. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In "Either an string", s/an/a.
Hm, the failure doesn't seem related to my changes. |
Some minor api and doc adjustments
Fix sorting in ` cargo dev update_lints` script changelog: none The old code cloned and sorted `usable_lints` into `sorted_usable_lints`, but then failed to do anything with `sorted_usable_lints`. This was discovered by my new `collection_is_never_read` lint (rust-lang#9267) that I'm working on! Fix: I renamed the sorted vector to `usable_lints`. Therefore it now gets used where the unsorted one was used previously.
…llogiq Add `collection_is_never_read` Fixes rust-lang#9267 `@flip1995` and `@llogiq,` I talked with you about this one at Rust Nation in London last week. :-) This is my first contribution to Clippy, so lots of feedback would be greatly appreciated. - \[ ] Followed [lint naming conventions][lint_naming] - \[x] Added passing UI tests (including committed `.stderr` file) - \[x] `cargo test` passes locally - \[x] Executed `cargo dev update_lints` - \[x] Added lint documentation - \[x] Run `cargo dev fmt` `dogfood` found one true positive (see rust-lang#9509) and no false positives. `lintcheck` found no (true or false) positives, even when running on an extended set of crates. --- changelog: new lint [`collection_is_never_read`] [rust-lang#10415](rust-lang/rust-clippy#10415) <!-- changelog_checked -->
No description provided.