-
Notifications
You must be signed in to change notification settings - Fork 13.3k
fix more clippy::style findings #106137
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
fix more clippy::style findings #106137
Conversation
match_result_ok obfuscated_if_else single_char_add writeln_empty_string collapsible_match iter_cloned_collect unnecessary_mut_passed
CheckLintNameResult::Tool(result) => { | ||
if let Err((Some(_), new_name)) = result { | ||
sess.emit_warning(CheckNameDeprecated { | ||
lint_name: lint_name.clone(), | ||
new_name, | ||
sub: RequestedLevel { level, lint_name }, | ||
}); | ||
} | ||
CheckLintNameResult::Tool(Err((Some(_), new_name))) => { |
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.
this change looks correct, but for a non-trivial reason, only because the _ => {}
branch at the end does nothing
@bors r+ rollup |
.copied() | ||
.collect::<Vec<_>>() | ||
.join(", "), | ||
ts[..ts.len() - 1].to_vec().join(", "), |
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.
It's an example where the Itertools lazy joining is useful... It should be in the stdlib in my opinion.
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.
This conversation has already been had at length, please don't bring it up on unrelated PRs. #79524
…iaskrgr Rollup of 4 pull requests Successful merges: - rust-lang#105375 (Fix an outdated comment mentioning parameter that doesn't exist anymore) - rust-lang#105955 (Remove wrapper functions for some unstable options) - rust-lang#106137 (fix more clippy::style findings) - rust-lang#106140 (Migrate links-color.goml to functions) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
match_result_ok
obfuscated_if_else
single_char_add
writeln_empty_string
collapsible_match
iter_cloned_collect
unnecessary_mut_passed
r? @compiler-errors