2021-12-17 12:40:22 +00:00
|
|
|
error: unnecessary use of `copied`
|
2024-05-21 17:39:30 +00:00
|
|
|
--> tests/ui/unnecessary_iter_cloned.rs:31:22
|
2021-12-17 12:40:22 +00:00
|
|
|
|
|
|
|
|
LL | for (t, path) in files.iter().copied() {
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
= note: `-D clippy::unnecessary-to-owned` implied by `-D warnings`
|
2023-08-01 12:02:21 +00:00
|
|
|
= help: to override `-D warnings` add `#[allow(clippy::unnecessary_to_owned)]`
|
2021-12-17 12:40:22 +00:00
|
|
|
help: use
|
|
|
|
|
|
|
|
|
LL | for (t, path) in files {
|
|
|
|
| ~~~~~
|
2024-05-30 08:49:05 +00:00
|
|
|
help: remove any references to the binding
|
2021-12-17 12:40:22 +00:00
|
|
|
|
|
|
|
|
LL - let other = match get_file_path(&t) {
|
|
|
|
LL + let other = match get_file_path(t) {
|
2022-06-15 11:15:54 +00:00
|
|
|
|
|
2021-12-17 12:40:22 +00:00
|
|
|
|
|
|
|
error: unnecessary use of `copied`
|
2024-05-21 17:39:30 +00:00
|
|
|
--> tests/ui/unnecessary_iter_cloned.rs:46:22
|
2021-12-17 12:40:22 +00:00
|
|
|
|
|
|
|
|
LL | for (t, path) in files.iter().copied() {
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
help: use
|
|
|
|
|
|
|
|
|
LL | for (t, path) in files.iter() {
|
|
|
|
| ~~~~~~~~~~~~
|
2024-05-30 08:49:05 +00:00
|
|
|
help: remove any references to the binding
|
2021-12-17 12:40:22 +00:00
|
|
|
|
|
|
|
|
LL - let other = match get_file_path(&t) {
|
|
|
|
LL + let other = match get_file_path(t) {
|
2022-06-15 11:15:54 +00:00
|
|
|
|
|
2021-12-17 12:40:22 +00:00
|
|
|
|
2024-05-30 08:49:05 +00:00
|
|
|
error: unnecessary use of `cloned`
|
|
|
|
--> tests/ui/unnecessary_iter_cloned.rs:177:18
|
|
|
|
|
|
|
|
|
LL | for c in v.iter().cloned() {
|
|
|
|
| ^^^^^^^^^^^^^^^^^ help: use: `v.iter()`
|
|
|
|
|
|
|
|
error: unnecessary use of `cloned`
|
|
|
|
--> tests/ui/unnecessary_iter_cloned.rs:185:18
|
|
|
|
|
|
|
|
|
LL | for c in v.iter().cloned() {
|
|
|
|
| ^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
help: use
|
|
|
|
|
|
|
|
|
LL | for c in v.iter() {
|
|
|
|
| ~~~~~~~~
|
|
|
|
help: remove any references to the binding
|
|
|
|
|
|
|
|
|
LL - let ref_c = &c;
|
|
|
|
LL + let ref_c = c;
|
|
|
|
|
|
|
|
|
|
|
|
|
error: unnecessary use of `cloned`
|
|
|
|
--> tests/ui/unnecessary_iter_cloned.rs:194:23
|
|
|
|
|
|
|
|
|
LL | for (i, c) in v.iter().cloned() {
|
|
|
|
| ^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
help: use
|
|
|
|
|
|
|
|
|
LL | for (i, c) in v.iter() {
|
|
|
|
| ~~~~~~~~
|
|
|
|
help: remove any references to the binding
|
|
|
|
|
|
|
|
|
LL ~ let ref_c = c;
|
|
|
|
LL ~ let ref_i = i;
|
|
|
|
|
|
|
|
|
|
|
|
|
error: aborting due to 5 previous errors
|
2021-12-17 12:40:22 +00:00
|
|
|
|