e4be2b4e64
I noticed that I suppress this lint in many of my projects. https://github.com/search?q=needless_pass_by_value+user%3Adtolnay&type=Code https://github.com/search?q=needless_pass_by_value+user%3Aserde-rs&type=Code Upon further inspection, this lint has a *long* history of false positives (and several remaining). Generally I feel that this lint is the definition of pedantic and should not be linted by default. #[derive(Debug)] enum How { ThisWay, ThatWay, } // Are we really better off forcing the call sites to write f(&_)...? fn f(how: How) { println!("You want to do it {:?}", how); } fn main() { f(How::ThatWay); } |
||
---|---|---|
.. | ||
src | ||
Cargo.toml | ||
README.md |