change to iterate over &vet

This commit is contained in:
FuGangqiang 2015-02-28 09:59:52 +08:00
parent 05bdfe8e2e
commit 69bfb6f717

View File

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