File tree Expand file tree Collapse file tree 3 files changed +9
-7
lines changed Expand file tree Collapse file tree 3 files changed +9
-7
lines changed Original file line number Diff line number Diff line change 55 clippy::redundant_clone,
66 clippy::deref_addrof,
77 clippy::no_effect,
8- clippy::unnecessary_operation
8+ clippy::unnecessary_operation,
9+ clippy::vec_init_then_push
910)]
1011
1112use std::cell::RefCell;
Original file line number Diff line number Diff line change 55 clippy:: redundant_clone,
66 clippy:: deref_addrof,
77 clippy:: no_effect,
8- clippy:: unnecessary_operation
8+ clippy:: unnecessary_operation,
9+ clippy:: vec_init_then_push
910) ]
1011
1112use std:: cell:: RefCell ;
Original file line number Diff line number Diff line change 11error: using `clone` on type `i32` which implements the `Copy` trait
2- --> $DIR/clone_on_copy.rs:22 :5
2+ --> $DIR/clone_on_copy.rs:23 :5
33 |
44LL | 42.clone();
55 | ^^^^^^^^^^ help: try removing the `clone` call: `42`
66 |
77 = note: `-D clippy::clone-on-copy` implied by `-D warnings`
88
99error: using `clone` on type `i32` which implements the `Copy` trait
10- --> $DIR/clone_on_copy.rs:26 :5
10+ --> $DIR/clone_on_copy.rs:27 :5
1111 |
1212LL | (&42).clone();
1313 | ^^^^^^^^^^^^^ help: try dereferencing it: `*(&42)`
1414
1515error: using `clone` on type `i32` which implements the `Copy` trait
16- --> $DIR/clone_on_copy.rs:29 :5
16+ --> $DIR/clone_on_copy.rs:30 :5
1717 |
1818LL | rc.borrow().clone();
1919 | ^^^^^^^^^^^^^^^^^^^ help: try dereferencing it: `*rc.borrow()`
2020
2121error: using `clone` on type `char` which implements the `Copy` trait
22- --> $DIR/clone_on_copy.rs:35 :14
22+ --> $DIR/clone_on_copy.rs:36 :14
2323 |
2424LL | is_ascii('z'.clone());
2525 | ^^^^^^^^^^^ help: try removing the `clone` call: `'z'`
2626
2727error: using `clone` on type `i32` which implements the `Copy` trait
28- --> $DIR/clone_on_copy.rs:39 :14
28+ --> $DIR/clone_on_copy.rs:40 :14
2929 |
3030LL | vec.push(42.clone());
3131 | ^^^^^^^^^^ help: try removing the `clone` call: `42`
You can’t perform that action at this time.
0 commit comments