mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-14 17:07:17 +00:00
26 lines
821 B
Text
26 lines
821 B
Text
error: you seem to use `.enumerate()` and immediately discard the index
|
|
--> tests/ui/unused_enumerate_index.rs:8:19
|
|
|
|
|
LL | for (_, x) in v.iter().enumerate() {
|
|
| ^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
= note: `-D clippy::unused-enumerate-index` implied by `-D warnings`
|
|
= help: to override `-D warnings` add `#[allow(clippy::unused_enumerate_index)]`
|
|
help: remove the `.enumerate()` call
|
|
|
|
|
LL | for x in v.iter() {
|
|
| ~ ~~~~~~~~
|
|
|
|
error: you seem to use `.enumerate()` and immediately discard the index
|
|
--> tests/ui/unused_enumerate_index.rs:55:19
|
|
|
|
|
LL | for (_, x) in dummy.enumerate() {
|
|
| ^^^^^^^^^^^^^^^^^
|
|
|
|
|
help: remove the `.enumerate()` call
|
|
|
|
|
LL | for x in dummy {
|
|
| ~ ~~~~~
|
|
|
|
error: aborting due to 2 previous errors
|
|
|