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:
@@ -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);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user