Skip to content
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

more clippy fixes #70613

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
Contributor

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
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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants