1
Fork 0

migrate many for loops to foreach

This commit is contained in:
Daniel Micay 2013-08-01 03:16:42 -04:00
parent 5f59c46e0f
commit 1fc4db2d08
255 changed files with 1292 additions and 1294 deletions

View file

@ -380,7 +380,7 @@ fn noop_fold_method(m: @method, fld: @ast_fold) -> @method {
pub fn noop_fold_block(b: &Block, fld: @ast_fold) -> Block {
let view_items = b.view_items.map(|x| fld.fold_view_item(x));
let mut stmts = ~[];
for b.stmts.iter().advance |stmt| {
foreach stmt in b.stmts.iter() {
match fld.fold_stmt(*stmt) {
None => {}
Some(stmt) => stmts.push(stmt)