Conver reborrows to .iter() calls where appropriate
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user