From d5d7e6565a4034b93d19be1edafd20730a4276bc Mon Sep 17 00:00:00 2001 From: Jorge Aparicio Date: Sat, 31 Jan 2015 12:20:46 -0500 Subject: `for x in xs.iter()` -> `for x in &xs` --- src/rustbook/book.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/rustbook') diff --git a/src/rustbook/book.rs b/src/rustbook/book.rs index 2707a6346c8..e7739300790 100644 --- a/src/rustbook/book.rs +++ b/src/rustbook/book.rs @@ -49,7 +49,7 @@ impl<'a> Iterator for BookItems<'a> { let cur = self.cur_items.get(self.cur_idx).unwrap(); let mut section = "".to_string(); - for &(_, idx) in self.stack.iter() { + for &(_, idx) in &self.stack { section.push_str(&(idx + 1).to_string()[]); section.push('.'); } -- cgit 1.4.1-3-g733a5