migrate many for
loops to foreach
This commit is contained in:
parent
5f59c46e0f
commit
1fc4db2d08
255 changed files with 1292 additions and 1294 deletions
|
@ -379,7 +379,7 @@ impl CodeMap {
|
|||
}
|
||||
|
||||
pub fn get_filemap(&self, filename: &str) -> @FileMap {
|
||||
for self.files.iter().advance |fm| { if filename == fm.name { return *fm; } }
|
||||
foreach fm in self.files.iter() { if filename == fm.name { return *fm; } }
|
||||
//XXjdm the following triggers a mismatched type bug
|
||||
// (or expected function, found _|_)
|
||||
fail!(); // ("asking for " + filename + " which we don't know about");
|
||||
|
@ -465,7 +465,7 @@ impl CodeMap {
|
|||
// The number of extra bytes due to multibyte chars in the FileMap
|
||||
let mut total_extra_bytes = 0;
|
||||
|
||||
for map.multibyte_chars.iter().advance |mbc| {
|
||||
foreach mbc in map.multibyte_chars.iter() {
|
||||
debug!("codemap: %?-byte char at %?", mbc.bytes, mbc.pos);
|
||||
if mbc.pos < bpos {
|
||||
total_extra_bytes += mbc.bytes;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue