Conver reborrows to .iter() calls where appropriate

This commit is contained in:
Joshua Landau
2015-06-11 13:56:07 +01:00
parent ca7418b846
commit d7f5fa4636
47 changed files with 109 additions and 109 deletions

View File

@@ -796,7 +796,7 @@ impl CodeMap {
}
pub fn get_filemap(&self, filename: &str) -> Rc<FileMap> {
for fm in &*self.files.borrow() {
for fm in self.files.borrow().iter() {
if filename == fm.name {
return fm.clone();
}
@@ -821,7 +821,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() {
for mbc in map.multibyte_chars.borrow().iter() {
debug!("{}-byte char at {:?}", mbc.bytes, mbc.pos);
if mbc.pos < bpos {
// every character is at least one byte, so we only