1
0
mirror of https://github.com/adambard/learnxinyminutes-docs.git synced 2025-08-01 12:30:48 +02:00

[rust/all] Remove .iter() on array example (#4230)

As of Rust 1.53.0, arrays implement the IntoIterator trait, making .iter() on an array unnecessary
This commit is contained in:
Ay355
2021-11-01 14:27:42 -07:00
committed by GitHub
parent 3cdecb5941
commit 9552f2a1fe
10 changed files with 10 additions and 11 deletions

View File

@@ -221,7 +221,7 @@ fn main() {
    // `for` boucles / itération
    let array = [1, 2, 3];
    for i in array.iter() {
    for i in array {
        println!("{}", i);
    }