diff options
| author | Jorge Aparicio <japaricious@gmail.com> | 2015-01-31 12:20:46 -0500 |
|---|---|---|
| committer | Jorge Aparicio <japaricious@gmail.com> | 2015-02-02 13:40:18 -0500 |
| commit | d5d7e6565a4034b93d19be1edafd20730a4276bc (patch) | |
| tree | f978751c20a214c9fe0cd2d60645a4e1a3b760fd /src/rustbook | |
| parent | 9f90d666e0cd9a73ef35b76b6605f9d1f69df849 (diff) | |
| download | rust-d5d7e6565a4034b93d19be1edafd20730a4276bc.tar.gz rust-d5d7e6565a4034b93d19be1edafd20730a4276bc.zip | |
`for x in xs.iter()` -> `for x in &xs`
Diffstat (limited to 'src/rustbook')
| -rw-r--r-- | src/rustbook/book.rs | 2 |
1 files changed, 1 insertions, 1 deletions
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('.'); } |
