Fix no_closure build.

This commit is contained in:
Stephen Chung
2021-09-26 21:30:33 +08:00
parent a130960627
commit 42d3fde0af
2 changed files with 5 additions and 3 deletions

View File

@@ -822,7 +822,7 @@ fn optimize_expr(expr: &mut Expr, state: &mut OptimizerState, chaining: bool) {
// ``
Expr::InterpolatedString(x, pos) if x.is_empty() => {
state.set_dirty();
*expr = Expr::StringConstant(state.engine.const_empty_string().clone(), *pos);
*expr = Expr::StringConstant(state.engine.const_empty_string(), *pos);
}
// `...`
Expr::InterpolatedString(x, _) if x.len() == 1 && matches!(x[0], Expr::StringConstant(_, _)) => {