-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
even more clippy cleanups #69736
Merged
Merged
even more clippy cleanups #69736
Conversation
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
Member
matthiaskrgr
commented
Mar 5, 2020
•
edited
Loading
edited
- Don't pass &mut where immutable reference (&) is sufficient (clippy::unnecessary_mut_passed)
- Use more efficient &&str to String conversion (clippy::inefficient_to_string)
- Don't always eval arguments inside .expect(), use unwrap_or_else and closure. (clippy::expect_fun_call)
- Use righthand '&' instead of lefthand "ref". (clippy::toplevel_ref_arg)
- Use simple 'for i in x' loops instead of 'while let Some(i) = x.next()' loops on iterators. (clippy::while_let_on_iterator)
- Const items have by default a static lifetime, there's no need to annotate it. (clippy::redundant_static_lifetimes)
- Remove redundant patterns when matching ( x @ _ to x) (clippy::redundant_pattern)
…otate it. (clippy::redundant_static_lifetimes)
…)' loops on iterators. (clippy::while_let_on_iterator)
…closure. (clippy::expect_fun_call)
…unnecessary_mut_passed)
Was it in consideration to force clippy warnings to be resolve before a merge? |
There are too many false positives imo. |
aclonegeek
reviewed
Mar 5, 2020
// not advance `caller_iter` for ZSTs. | ||
let mut locals_iter = body.args_iter(); | ||
while let Some(local) = locals_iter.next() { | ||
// not advance `caller_iter` for ZSTs |
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.
Suggested change
// not advance `caller_iter` for ZSTs | |
// not advance `caller_iter` for ZSTs. |
@bors r+ rollup |
📌 Commit 84577c8 has been approved by |
bors
added
the
S-waiting-on-bors
Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
label
Mar 5, 2020
bors
added a commit
that referenced
this pull request
Mar 5, 2020
Rollup of 8 pull requests Successful merges: - #69697 (Add explanation for E0380) - #69698 (Use associated constants of integer types) - #69711 (Update macros.rs: fix documentation typo.) - #69713 (more clippy cleanups) - #69728 (Make link to `std::str` active) - #69732 (Clean E0382 and E0384 explanations) - #69736 (even more clippy cleanups) - #69742 (Fixed a typo) Failed merges: r? @ghost
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
S-waiting-on-bors
Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.