rust/tests/ui/unnecessary_iter_cloned.stderr

75 lines
2.0 KiB
Plaintext
Raw Normal View History

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