2021-12-17 06:40:22 -06:00
|
|
|
error: unnecessary use of `copied`
|
2024-07-15 03:44:02 -05:00
|
|
|
--> tests/ui/unnecessary_iter_cloned.rs:33:22
|
2021-12-17 06:40:22 -06:00
|
|
|
|
|
|
|
|
LL | for (t, path) in files.iter().copied() {
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
= note: `-D clippy::unnecessary-to-owned` implied by `-D warnings`
|
2023-08-01 07:02:21 -05:00
|
|
|
= help: to override `-D warnings` add `#[allow(clippy::unnecessary_to_owned)]`
|
2021-12-17 06:40:22 -06:00
|
|
|
help: use
|
|
|
|
|
|
|
|
|
LL | for (t, path) in files {
|
|
|
|
| ~~~~~
|
2024-05-24 10:59:09 -05:00
|
|
|
help: remove any references to the binding
|
2021-12-17 06:40:22 -06:00
|
|
|
|
|
|
|
|
LL - let other = match get_file_path(&t) {
|
|
|
|
LL + let other = match get_file_path(t) {
|
2022-06-15 06:15:54 -05:00
|
|
|
|
|
2021-12-17 06:40:22 -06:00
|
|
|
|
|
|
|
error: unnecessary use of `copied`
|
2024-07-15 03:44:02 -05:00
|
|
|
--> tests/ui/unnecessary_iter_cloned.rs:48:22
|
2021-12-17 06:40:22 -06:00
|
|
|
|
|
|
|
|
LL | for (t, path) in files.iter().copied() {
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
help: use
|
|
|
|
|
|
|
|
|
LL | for (t, path) in files.iter() {
|
|
|
|
| ~~~~~~~~~~~~
|
2024-05-24 10:59:09 -05:00
|
|
|
help: remove any references to the binding
|
2021-12-17 06:40:22 -06:00
|
|
|
|
|
|
|
|
LL - let other = match get_file_path(&t) {
|
|
|
|
LL + let other = match get_file_path(t) {
|
2022-06-15 06:15:54 -05:00
|
|
|
|
|
2021-12-17 06:40:22 -06:00
|
|
|
|
2024-05-24 10:59:09 -05:00
|
|
|
error: unnecessary use of `cloned`
|
2024-07-15 03:44:02 -05:00
|
|
|
--> tests/ui/unnecessary_iter_cloned.rs:179:18
|
2024-05-24 10:59:09 -05:00
|
|
|
|
|
|
|
|
LL | for c in v.iter().cloned() {
|
|
|
|
| ^^^^^^^^^^^^^^^^^ help: use: `v.iter()`
|
|
|
|
|
|
|
|
error: unnecessary use of `cloned`
|
2024-07-15 03:44:02 -05:00
|
|
|
--> tests/ui/unnecessary_iter_cloned.rs:187:18
|
2024-05-24 10:59:09 -05:00
|
|
|
|
|
|
|
|
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`
|
2024-07-15 03:44:02 -05:00
|
|
|
--> tests/ui/unnecessary_iter_cloned.rs:196:23
|
2024-05-24 10:59:09 -05:00
|
|
|
|
|
|
|
|
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 06:40:22 -06:00
|
|
|
|