Open
Description
Have for example this code:
#[automock]
pub trait Compare<T> {
fn is_different_except_foo<'a>(&self, other: Option<&'a T>) -> bool;
}
When running clippy:
cargo clippy --release --all-targets -- -Dclippy::all -Dclippy::pedantic
This is the error popping up:
error: since `&` implements the `Copy` trait, `&Option<&T>` can be simplified to `Option<&T>`
--> configurator/src/entities/resources.rs:34:1
|
34 | #[automock]
| ^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ref_option_ref
= note: this error originates in the attribute macro `automock` (in Nightly builds, run with -Z macro-backtrace for more info)
Metadata
Metadata
Assignees
Labels
No labels