mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-12-22 02:53:20 +00:00
18 lines
743 B
Text
18 lines
743 B
Text
|
error: it is more concise to loop over references to containers instead of using explicit iteration methods
|
||
|
--> $DIR/explicit_iter_loop.rs:6:14
|
||
|
|
|
||
|
LL | for _ in rmvec.iter() {}
|
||
|
| ^^^^^^^^^^^^ help: to write this more concisely, try: `&*rmvec`
|
||
|
|
|
||
|
= note: `-D clippy::explicit-iter-loop` implied by `-D warnings`
|
||
|
= help: to override `-D warnings` add `#[allow(clippy::explicit_iter_loop)]`
|
||
|
|
||
|
error: it is more concise to loop over references to containers instead of using explicit iteration methods
|
||
|
--> $DIR/explicit_iter_loop.rs:8:14
|
||
|
|
|
||
|
LL | for _ in rmvec.iter_mut() {}
|
||
|
| ^^^^^^^^^^^^^^^^ help: to write this more concisely, try: `&mut *rmvec`
|
||
|
|
||
|
error: aborting due to 2 previous errors
|
||
|
|