Closed
Description
openedon Apr 1, 2018
I build clippy from git sources (4ef7238).
This is re-open of #2498 as @oli-obk suggested.
And actully nothing changes because of #2582 , and why it should?
Sample code:
use std::io;
pub fn map_err(err: io::Error) -> String {
format!("{}", err)
}
$ cargo clippy
Compiling foo v0.1.0 (file:///tmp/foo)
warning: this argument is passed by value, but not consumed in the function body
--> src/lib.rs:3:21
|
3 | pub fn map_err(err: io::Error) -> String {
| ^^^^^^^^^ help: consider taking a reference instead: `&io::Error`
|
= note: #[warn(needless_pass_by_value)] on by default
= help: for further information visit https://rust-lang-nursery.github.io/rust-clippy/v0.0.191/index.html#needless_pass_by_value
Finished dev [unoptimized + debuginfo] target(s) in 0.14 secs
$ cargo clippy
Finished dev [unoptimized + debuginfo] target(s) in 0.0 secs
As you use the second run of clippy
gives nothing, and cargo clippy --help
have no options to force rerun.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment