RS.CLIPPY.EXPLICIT_INTO_ITER_LOOP

For-looping over `_.into_iter()` when `_` would do

This checker is a Clippy lint created by The Rust Project Contributors. The documentation shown here is a copy of the original documentation for: explicit_into_iter_loop. Copyright ©2025 The Rust Team. All rights reserved.

What it does

Checks for loops on y.into_iter() where y will do, and suggests the latter.

Why is this bad?

Readability.

Example

// with `y` a `Vec` or slice:
for x in y.into_iter() {
    // ..
}

can be rewritten to

for x in y {
    // ..
}