warning: since `&` implements the `Copy` trait, `&Option<&T>` can be simplified to `Option<&T>`
--> src/lib.rs:3:1
|
3 | / pin_project_lite::pin_project! {
4 | | struct X<'a> {
5 | | inner: Option<&'a mut i32>,
6 | | }
7 | | }
| |_^
|
note: the lint level is defined here
--> src/lib.rs:1:9
|
1 | #![warn(clippy::pedantic)]
| ^^^^^^^^^^^^^^^^
= note: `#[warn(clippy::ref_option_ref)]` implied by `#[warn(clippy::pedantic)]`
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ref_option_ref
= note: this warning originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
It would be very appreciated if this could be avoided.
The following code:
Generates a warning when run using Clippy:
It would be very appreciated if this could be avoided.