change to iterate over &vet
This commit is contained in:
parent
05bdfe8e2e
commit
69bfb6f717
@ -565,7 +565,7 @@ while retaining safety. The answer is iterators:
|
||||
```{rust}
|
||||
let vec = vec![1, 2, 3];
|
||||
|
||||
for x in vec {
|
||||
for x in &vec {
|
||||
println!("{}", x);
|
||||
}
|
||||
```
|
||||
|
Loading…
Reference in New Issue
Block a user