[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
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
10 changed files with 10 additions and 11 deletions

View File

@ -255,7 +255,7 @@ fn main() {
// `for` Schleife/Iterationen
let array = [1, 2, 3];
for i in array.iter() {
for i in array {
println!("{}", i);
}

View File

@ -242,7 +242,7 @@ fn main() {
// Βρόγχοι `for`
let array = [1, 2, 3];
for i in array.iter() {
for i in array {
println!("{}", i);
}

View File

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

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);
    }

View File

@ -229,7 +229,7 @@ fn main() {
// Ciclo/iterazione con `for`
let array = [1, 2, 3];
for i in array.iter() {
for i in array {
println!("{}", i);
}

View File

@ -234,7 +234,7 @@ fn main() {
// `for` laços de repetição/iteração
let array = [1, 2, 3];
for i in array.iter() {
for i in array {
println!("{}", i);
}
@ -329,4 +329,3 @@ mais na página oficial [Rust website](http://rust-lang.org).
No Brasil acompanhe os encontros do [Meetup Rust São Paulo]
(http://www.meetup.com/pt-BR/Rust-Sao-Paulo-Meetup/).

View File

@ -226,7 +226,7 @@ fn main() {
// `for` loops/iteration
let array = [1, 2, 3];
for i in array.iter() {
for i in array {
println!("{}", i);
}

View File

@ -236,7 +236,7 @@ fn main() {
// `for` loops/iteration
let array = [1, 2, 3];
for i in array.iter() {
for i in array {
println!("{}", i);
}

View File

@ -233,7 +233,7 @@ fn main() {
// Цикл `for`
let array = [1, 2, 3];
for i in array.iter() {
for i in array {
println!("{}", i);
}

View File

@ -211,7 +211,7 @@ fn main() {
// `for` 循环
let array = [1, 2, 3];
for i in array.iter() {
for i in array {
println!("{}", i);
}