File tree Expand file tree Collapse file tree 2 files changed +548
-0
lines changed Expand file tree Collapse file tree 2 files changed +548
-0
lines changed Original file line number Diff line number Diff line change 1+ error: unnecessary use of `copied`
2+ --> $DIR/unnecessary_iter_cloned.rs:31:22
3+ |
4+ LL | for (t, path) in files.iter().copied() {
5+ | ^^^^^^^^^^^^^^^^^^^^^
6+ |
7+ = note: `-D clippy::unnecessary-to-owned` implied by `-D warnings`
8+ help: use
9+ |
10+ LL | for (t, path) in files {
11+ | ~~~~~
12+ help: remove this `&`
13+ |
14+ LL - let other = match get_file_path(&t) {
15+ LL + let other = match get_file_path(t) {
16+ |
17+
18+ error: unnecessary use of `copied`
19+ --> $DIR/unnecessary_iter_cloned.rs:46:22
20+ |
21+ LL | for (t, path) in files.iter().copied() {
22+ | ^^^^^^^^^^^^^^^^^^^^^
23+ |
24+ help: use
25+ |
26+ LL | for (t, path) in files.iter() {
27+ | ~~~~~~~~~~~~
28+ help: remove this `&`
29+ |
30+ LL - let other = match get_file_path(&t) {
31+ LL + let other = match get_file_path(t) {
32+ |
33+
34+ error: aborting due to 2 previous errors
35+
You can’t perform that action at this time.
0 commit comments