Conversation
| use std::time::Duration; | ||
|
|
||
| #[test] | ||
| #[allow(clippy::redundant_clone)] |
There was a problem hiding this comment.
why allow instead of resolve? is this more complex than removing the last .clone()?
There was a problem hiding this comment.
I found it made it more consistent to read...
There was a problem hiding this comment.
This one was probably catched by your editor but not by the CI which does not clippy the tests.
Maybe you could consider using clippy --test instead of clippy in the the CI to catch those issues earlier ?
There was a problem hiding this comment.
Huh? I run the same command as CI runs.
There was a problem hiding this comment.
Strange indeed, On my side I only get the redundant closure error when running cargo clippy --tests. Running rust stable 1.45.2 and nightly 1.47.0-nightly (f44c6e4e2 2020-08-24).
There was a problem hiding this comment.
Forgot to say I am running Windows 10, I will try on Linux tonight
There was a problem hiding this comment.
Investigating this further I see that cargo clippy --all-targets also activate the --tests flag. This is maybe the command you are running ? When running only cargo clippy -- -D warnings (used by CI) I do not get the errors from #[cfg(test)] guarded code.
There was a problem hiding this comment.
nightly-x86_64-pc-windows-msvc (overridden by +toolchain on the command line)
rustc 1.47.0-nightly (5180f3da5 2020-08-23)
cargo +nightly clippy --tests --examples -- -D warnings
Huh, turns out that's what Tide runs but not this. Adding a commit...
43b48dd to
a870b5f
Compare
|
Fixed something that was in an even newer version of clippy. |
This should unblock CI on main.
a870b5f to
5cda3d6
Compare
Same as Tide. See comments in http-rs#234
|
Ok I am merging this to unblock CI |
This should unblock CI on main.