Convert old-style for loops to new-style
Most could use the each method, but because of the hack used to disambiguate old- and new-style loops, some had to use vec::each. (This hack will go away soon.) Issue #1619
This commit is contained in:
@@ -46,7 +46,7 @@ fn field_expr(f: ast::field) -> @ast::expr { ret f.node.expr; }
|
||||
|
||||
fn field_exprs(fields: [ast::field]) -> [@ast::expr] {
|
||||
let mut es = [];
|
||||
for f: ast::field in fields { es += [f.node.expr]; }
|
||||
for fields.each {|f| es += [f.node.expr]; }
|
||||
ret es;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user