From 69bfb6f717b927f5f388391df40a8676e5f39ea6 Mon Sep 17 00:00:00 2001 From: FuGangqiang Date: Sat, 28 Feb 2015 09:59:52 +0800 Subject: [PATCH] change to iterate over &vet --- src/doc/intro.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/doc/intro.md b/src/doc/intro.md index eb190d2ab2e..07a90959deb 100644 --- a/src/doc/intro.md +++ b/src/doc/intro.md @@ -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); } ```