Resolve some Clippy warnings#5835
Conversation
I'm confused. Now this is duplicated with src/bin/cargo/main.rs and I don't know how to avoid that. Tips welcome.
|
r? @matklad (rust_highfive has picked a reviewer for you, use r? to override) |
|
Feedback welcome 🙂 |
|
FWIW I'm personally not a huge fan of Is there perhaps a different location (not in the source code) that lints could be turned off? |
|
Maybe after #5728 is merged and we're dogfooding that? Though that would only work for the ones we're happy to toggle "globally". |
TIL Rust doesn't have equational reasoning.. :-/ (can't inline the new "exec" bindings)
.. by inlining & removing `Members::is_empty`. For details see https://rust-lang-nursery.github.io/rust-clippy/v0.0.212/index.html#wrong_self_convention Asides from opt-ing out, the alternative I saw was calling it "into_empty" and make it return a little enum Empty { Empty, NonEmpty } type.
|
Fixed up a commit where I'd forgotten to adapt the test sources too. |
|
Now that I think of it, @alexcrichton, clippy configuration is also being discussed in the Clippy 1.0 RFC (rust-lang/rfcs#2476), if you want to get stuck in. 😄 |
|
Perhaps for now the lints could all be applied globally in |
|
@bors: r+ Thanks! |
|
📌 Commit 0807730 has been approved by |
Resolve some Clippy warnings
I'm not sure how these popped up since my PR 8 days ago.
My current hypotheses:
* changes in latest nightly rust/clippy
* new or changed cargo code
* I missed these as I was only touching `src/bin/cargo/main.rs`
For future reference I now iterate with:
touch src/bin/cargo/main.rs src/cargo/lib.rs && cargo +nightly clippy
|
☀️ Test successful - status-appveyor, status-travis |
I'm not sure how these popped up since my PR 8 days ago.
My current hypotheses:
src/bin/cargo/main.rsFor future reference I now iterate with: