c0459c5357
7956: Add assist to convert for_each into for loops r=Veykril a=SaiintBrisson This PR resolves #7821. Adds an assist to that converts an `Iterator::for_each` into a for loop: ```rust fn main() { let vec = vec![(1, 2), (2, 3), (3, 4)]; x.iter().for_each(|(x, y)| { println!("x: {}, y: {}", x, y); }) } ``` becomes ```rust fn main() { let vec = vec![(1, 2), (2, 3), (3, 4)]; for (x, y) in x.iter() { println!("x: {}, y: {}", x, y); }); } ``` Co-authored-by: Luiz Carlos Mourão Paes de Carvalho <luizcarlosmpc@gmail.com> Co-authored-by: Luiz Carlos <luizcarlosmpc@gmail.com> Co-authored-by: Lukas Wirth <lukastw97@gmail.com> |
||
---|---|---|
.. | ||
fuzz | ||
src | ||
test_data | ||
Cargo.toml |