From 05bdfe8e2e927ebdef6d039b7634e0dd7fa8a7a7 Mon Sep 17 00:00:00 2001 From: FuGangqiang Date: Fri, 27 Feb 2015 21:57:02 +0800 Subject: [PATCH] remove the call `.iter()` --- src/doc/intro.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/doc/intro.md b/src/doc/intro.md index c9d834ee123..eb190d2ab2e 100644 --- a/src/doc/intro.md +++ b/src/doc/intro.md @@ -536,7 +536,7 @@ use std::thread::Thread; fn main() { let numbers = vec![1, 2, 3]; - + let guards: Vec<_> = (0..3).map(|i| { Thread::scoped(move || { println!("{}", numbers[i]); @@ -565,7 +565,7 @@ while retaining safety. The answer is iterators: ```{rust} let vec = vec![1, 2, 3]; -for x in vec.iter() { +for x in vec { println!("{}", x); } ```