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 #70229

Merged
merged 7 commits into from
Mar 22, 2020
Merged

more clippy fixes #70229

merged 7 commits into from
Mar 22, 2020

Conversation

matthiaskrgr
Copy link
Member

  • remove unused unit values (clippy::unused_unit)
  • make some let-if-bindings more idiomatic (clippy::useless_let_if_seq)
  • clarify when we pass () to functions (clippy::unit_arg)
  • don't redundantly repeat field names (clippy::redundant_field_names)
  • remove redundant returns (clippy::needless_return)
  • use let instead of match for matches with single bindings (clippy::match_single_binding)
  • don't convert results to options just for matching (clippy::if_let_some_result)

Copy link
Member

@Mark-Simulacrum Mark-Simulacrum left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

r=me with nits fixed

src/librustc_span/source_map.rs Show resolved Hide resolved
src/librustc_mir/interpret/terminator.rs Outdated Show resolved Hide resolved
src/librustc/ty/layout.rs Show resolved Hide resolved
@matthiaskrgr
Copy link
Member Author

r? @Mark-Simulacrum

@Mark-Simulacrum
Copy link
Member

@bors r+ rollup

@bors
Copy link
Contributor

bors commented Mar 22, 2020

📌 Commit e45fdcf has been approved by Mark-Simulacrum

@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 22, 2020
Centril added a commit to Centril/rust that referenced this pull request Mar 22, 2020
more clippy fixes

* remove unused unit values (clippy::unused_unit)
* make some let-if-bindings more idiomatic (clippy::useless_let_if_seq)
* clarify when we pass () to functions (clippy::unit_arg)
* don't redundantly repeat field names (clippy::redundant_field_names)
* remove redundant returns (clippy::needless_return)
* use let instead of match for matches with single bindings (clippy::match_single_binding)
* don't convert results to options just for matching (clippy::if_let_some_result)
bors added a commit to rust-lang-ci/rust that referenced this pull request Mar 22, 2020
Rollup of 10 pull requests

Successful merges:

 - rust-lang#68099 (Amend Rc/Arc::from_raw() docs regarding unsafety)
 - rust-lang#70172 (parse/lexer: support `StringReader::retokenize` called on external files.)
 - rust-lang#70209 (parser: recover on `for<'a> |...| body` closures)
 - rust-lang#70223 (fix type of const params in associated types.)
 - rust-lang#70229 (more clippy fixes)
 - rust-lang#70240 (Return NonZeroU64 from ThreadId::as_u64.)
 - rust-lang#70250 (Remove wrong entry from RELEASES.md)
 - rust-lang#70253 (Remove another wrong entry from RELEASES.md)
 - rust-lang#70254 (couple more clippy fixes (let_and_return, if_same_then_else))
 - rust-lang#70266 (proc_macro_harness: Use item header spans for errors)

Failed merges:

r? @ghost
@bors bors merged commit e58fec0 into rust-lang:master Mar 22, 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.

4 participants