mirror of
https://github.com/adambard/learnxinyminutes-docs.git
synced 2025-09-03 11:43:12 +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:
@@ -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/).
|
||||
|
||||
|
Reference in New Issue
Block a user