Skip to content

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

Merged
merged 1 commit into from
Dec 26, 2022
Merged

Conversation

matthiaskrgr
Copy link
Member

match_result_ok
obfuscated_if_else
single_char_add
writeln_empty_string
collapsible_match
iter_cloned_collect
unnecessary_mut_passed

r? @compiler-errors

match_result_ok
obfuscated_if_else
single_char_add
writeln_empty_string
collapsible_match
iter_cloned_collect
unnecessary_mut_passed
@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Dec 25, 2022
@jyn514 jyn514 self-assigned this Dec 25, 2022
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))) => {
Copy link
Member

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

@jyn514
Copy link
Member

jyn514 commented Dec 25, 2022

@bors r+ rollup

@bors
Copy link
Collaborator

bors commented Dec 25, 2022

📌 Commit d8874f2 has been approved by jyn514

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Dec 25, 2022
.copied()
.collect::<Vec<_>>()
.join(", "),
ts[..ts.len() - 1].to_vec().join(", "),

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.

Copy link
Member

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

bors added a commit to rust-lang-ci/rust that referenced this pull request Dec 25, 2022
…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
@bors bors merged commit 23967a9 into rust-lang:master Dec 26, 2022
@rustbot rustbot added this to the 1.68.0 milestone Dec 26, 2022
@matthiaskrgr matthiaskrgr deleted the clippy_style branch January 25, 2025 09:12
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. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants