Suppress incorrect_clone_impl_on_copy_type clippy false positive
https://github.com/rust-lang/rust-clippy/issues/11072 error: incorrect implementation of `clone` on a `Copy` type --> src/lib.rs:74:29 | 74 | fn clone(&self) -> Self { | _____________________________^ 75 | | Buffer::new() 76 | | } | |_____^ help: change this to: `{ *self }` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#incorrect_clone_impl_on_copy_type = note: `-D clippy::incorrect-clone-impl-on-copy-type` implied by `-D clippy::all`
This commit is contained in:
parent
0dccfa4597
commit
21ee1ba697
|
@ -72,6 +72,7 @@ impl Copy for Buffer {}
|
||||||
|
|
||||||
impl Clone for Buffer {
|
impl Clone for Buffer {
|
||||||
#[inline]
|
#[inline]
|
||||||
|
#[allow(clippy::incorrect_clone_impl_on_copy_type)] // false positive https://github.com/rust-lang/rust-clippy/issues/11072
|
||||||
fn clone(&self) -> Self {
|
fn clone(&self) -> Self {
|
||||||
Buffer::new()
|
Buffer::new()
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue