-
Notifications
You must be signed in to change notification settings - Fork 13.2k
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
librustdoc
: flatten nested ifs
#138090
librustdoc
: flatten nested ifs
#138090
Conversation
7df44af
to
fde3733
Compare
} | ||
} else { | ||
None | ||
if let ty::ClauseKind::Projection(proj) = bound.kind().skip_binder() |
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.
That could even be a clippy lint. :3
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 is. Not sure why it didn't fire. (I did run clippy on librustdoc
, and didn't see a warning on this)
https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if
(Also, clippy-fix-PR coming soon)
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.
Awesome, thanks!
Thanks for the cleanup! r=me once CI pass. @bors delegate=yotamofek |
✌️ @yotamofek, you can now approve this pull request! If @GuillaumeGomez told you to " |
Only 6 hours for the CI to run 😁 |
I think this should probably be rolled up... |
…mpiler-errors Rollup of 17 pull requests Successful merges: - rust-lang#137827 (Add timestamp to unstable feature usage metrics) - rust-lang#138041 (bootstrap and compiletest: Use `size_of_val` from the prelude instead of imported) - rust-lang#138046 (trim channel value in `get_closest_merge_commit`) - rust-lang#138053 (Increase the max. custom try jobs requested to `20`) - rust-lang#138061 (triagebot: add a `compiler_leads` ad-hoc group) - rust-lang#138064 (Remove - from xtensa targets cpu names) - rust-lang#138075 (Use final path segment for diagnostic) - rust-lang#138078 (Reduce the noise of bootstrap changelog warnings in --dry-run mode) - rust-lang#138081 (Move `yield` expressions behind their own feature gate) - rust-lang#138090 (`librustdoc`: flatten nested ifs) - rust-lang#138092 (Re-add `DynSend` and `DynSync` impls for `TyCtxt`) - rust-lang#138094 (a small borrowck cleanup) - rust-lang#138098 (Stabilize feature `const_copy_from_slice`) - rust-lang#138103 (Git ignore citool's target directory) - rust-lang#138105 (Fix broken link to Miri intrinsics in documentation) - rust-lang#138108 (Mention me (WaffleLapkin) when changes to `rustc_codegen_ssa` occur) - rust-lang#138117 ([llvm/PassWrapper] use `size_t` when building arg strings) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of rust-lang#138090 - yotamofek:pr/rustdoc/flatten-ifs, r=GuillaumeGomez `librustdoc`: flatten nested ifs Some minor cosmetic improvements (IMHO) found while working on something else. But reviewed with [no whitespace](https://github.com/rust-lang/rust/pull/138090/files?diff=unified&w=1).
…llaumeGomez `librustdoc`: clippy fixes First commit is all machine-generated fixes, next two are some more lints fixed by hand/misc. cleanups Inspired by the redundant `.and_then()` added in rust-lang#137320 , and [this comment](rust-lang#138090 (comment)) r? `@GuillaumeGomez`
…llaumeGomez `librustdoc`: clippy fixes First commit is all machine-generated fixes, next two are some more lints fixed by hand/misc. cleanups Inspired by the redundant `.and_then()` added in rust-lang#137320 , and [this comment](rust-lang#138090 (comment)) r? ``@GuillaumeGomez``
…llaumeGomez `librustdoc`: clippy fixes First commit is all machine-generated fixes, next two are some more lints fixed by hand/misc. cleanups Inspired by the redundant `.and_then()` added in rust-lang#137320 , and [this comment](rust-lang#138090 (comment)) r? ```@GuillaumeGomez```
Rollup merge of rust-lang#138107 - yotamofek:pr/rustdoc/clippy, r=GuillaumeGomez `librustdoc`: clippy fixes First commit is all machine-generated fixes, next two are some more lints fixed by hand/misc. cleanups Inspired by the redundant `.and_then()` added in rust-lang#137320 , and [this comment](rust-lang#138090 (comment)) r? ```@GuillaumeGomez```
Some minor cosmetic improvements (IMHO) found while working on something else.
But reviewed with no whitespace.