Reduce cloning.

This commit is contained in:
Stephen Chung
2020-04-05 17:44:48 +08:00
parent 94313ca095
commit 44d6a5e466
7 changed files with 44 additions and 48 deletions

View File

@@ -480,7 +480,7 @@ fn optimize_expr<'a>(expr: Expr, state: &mut State<'a>) -> Expr {
// Otherwise use the default value, if any
def_value.clone()
}
}).and_then(|result| map_dynamic_to_expr(result, pos).0)
}).and_then(|result| map_dynamic_to_expr(result, pos))
.map(|expr| {
state.set_dirty();
expr