Skip to content

more clippy fixes #70613

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Merged
merged 1 commit into from
Mar 31, 2020
Merged

more clippy fixes #70613

merged 1 commit into from
Mar 31, 2020

Conversation

matthiaskrgr
Copy link
Member

  • use is_empty() instead of len comparison (clippy::len_zero)
  • use if let instead of while let loop that never loops (clippy::never_loop)
  • remove redundant returns (clippy::needless_return)
  • remove redundant closures (clippy::redundant_closure)
  • use if let instead of match and wildcard pattern (clippy::single_match)
  • don't repeat field names redundantly (clippy::redundant_field_names)

r? @Centril

use is_empty() instead of len comparison (clippy::len_zero)
use if let instead of while let loop that never loops (clippy::never_loop)
remove redundant returns (clippy::needless_return)
remove redundant closures (clippy::redundant_closure)
use if let instead of match and wildcard pattern (clippy::single_match)
don't repeat field names redundantly (clippy::redundant_field_names)
@Centril
Copy link
Contributor

Centril commented Mar 31, 2020

@bors r+ rollup

@bors
Copy link
Collaborator

bors commented Mar 31, 2020

📌 Commit 08f2904 has been approved by Centril

@bors 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 31, 2020
bors added a commit to rust-lang-ci/rust that referenced this pull request Mar 31, 2020
Rollup of 9 pull requests

Successful merges:

 - rust-lang#69784 (Optimize strip_prefix and strip_suffix with str patterns)
 - rust-lang#70548 (Add long error code for error E0226)
 - rust-lang#70555 (resolve, `try_resolve_as_non_binding`: use `delay_span_bug` due to parser recovery)
 - rust-lang#70561 (remove obsolete comment)
 - rust-lang#70562 (infer array len from pattern)
 - rust-lang#70585 (std: Fix over-aligned allocations on wasm32-wasi)
 - rust-lang#70587 (Add `Rust` to the code snippet)
 - rust-lang#70588 (Fix incorrect documentation for `str::{split_at, split_at_mut}`)
 - rust-lang#70613 (more clippy fixes)

Failed merges:

r? @ghost
@ghost
Copy link

ghost commented Mar 31, 2020

How about enabling cargo fix for some rules with almost no false positives?

@bors bors merged commit 976f8d5 into rust-lang:master Mar 31, 2020
@matthiaskrgr matthiaskrgr deleted the cl5ppy_squashed branch January 25, 2025 09:12
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants