1
Fork 0

option: rewrite the API to use composition

This commit is contained in:
Daniel Micay 2013-09-20 02:08:47 -04:00
parent f647ccc79c
commit 6a90e80b62
80 changed files with 244 additions and 277 deletions

View file

@ -663,7 +663,7 @@ impl AstBuilder for @ExtCtxt {
fn expr_if(&self, span: Span,
cond: @ast::Expr, then: @ast::Expr, els: Option<@ast::Expr>) -> @ast::Expr {
let els = els.map_move(|x| self.expr_block(self.block_expr(x)));
let els = els.map(|x| self.expr_block(self.block_expr(x)));
self.expr(span, ast::ExprIf(cond, self.block_expr(then), els))
}