mirror of
https://github.com/rust-lang-cn/book-cn.git
synced 2025-02-02 23:38:41 +08:00
Merge pull request #99 from lukelafountaine/master
remove extraneous and potentially confusing variable declaration
This commit is contained in:
commit
23d375b35c
@ -183,7 +183,6 @@ Instead, we can use our last kind of loop: the `for` loop. It looks like this:
|
||||
```rust
|
||||
fn main() {
|
||||
let a = [1, 2, 3, 4, 5];
|
||||
let mut index = 0;
|
||||
|
||||
for element in a.iter() {
|
||||
println!("the value is: {}", element);
|
||||
|
Loading…
Reference in New Issue
Block a user