Fix build
This commit is contained in:
parent
8369a9bf63
commit
a82bb7b2ef
@ -841,11 +841,13 @@ fn optimize_stmt(stmt: &mut Stmt, state: &mut OptimizerState, preserve_result: b
|
||||
Stmt::Return(Some(ref mut expr), ..) => optimize_expr(expr, state, false),
|
||||
|
||||
// Share nothing
|
||||
#[cfg(not(feature = "no_closure"))]
|
||||
Stmt::Share(x) if x.is_empty() => {
|
||||
state.set_dirty();
|
||||
*stmt = Stmt::Noop(Position::NONE);
|
||||
}
|
||||
// Share constants
|
||||
#[cfg(not(feature = "no_closure"))]
|
||||
Stmt::Share(x) => {
|
||||
let len = x.len();
|
||||
x.retain(|(v, _, _)| !state.find_constant(v).is_some());
|
||||
|
Loading…
Reference in New Issue
Block a user