Closed
Description
Hey,
It would be nice if Clippy could detect needless references as in here:
fn main() {
let st = String::from("zomg");
myfunc(&&&&&st);
}
fn myfunc(param: &str) {
println!("param: {}", param);
}
The myfunc(&&&&&st);
should be myfunc(&st);
.
Side note: there is a similar, needless lifetime parameter detecting, that would trigger in e.g. fn myfunc<'a>(param: &'a str)