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/libsyntax/codemap.rs | |
| parent | 9f90d666e0cd9a73ef35b76b6605f9d1f69df849 (diff) | |
| download | rust-d5d7e6565a4034b93d19be1edafd20730a4276bc.tar.gz rust-d5d7e6565a4034b93d19be1edafd20730a4276bc.zip | |
`for x in xs.iter()` -> `for x in &xs`
Diffstat (limited to 'src/libsyntax/codemap.rs')
| -rw-r--r-- | src/libsyntax/codemap.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libsyntax/codemap.rs b/src/libsyntax/codemap.rs index 8adb9b24222..bd7a7783580 100644 --- a/src/libsyntax/codemap.rs +++ b/src/libsyntax/codemap.rs @@ -453,7 +453,7 @@ impl CodeMap { } pub fn get_filemap(&self, filename: &str) -> Rc<FileMap> { - for fm in self.files.borrow().iter() { + for fm in &*self.files.borrow() { if filename == fm.name { return fm.clone(); } @@ -477,7 +477,7 @@ impl CodeMap { // The number of extra bytes due to multibyte chars in the FileMap let mut total_extra_bytes = 0; - for mbc in map.multibyte_chars.borrow().iter() { + for mbc in &*map.multibyte_chars.borrow() { debug!("{}-byte char at {:?}", mbc.bytes, mbc.pos); if mbc.pos < bpos { // every character is at least one byte, so we only |
