This commit is contained in:
Stephen Chung
2022-07-20 21:06:36 +08:00
parent 2ac6336173
commit ff6a448b77
3 changed files with 6 additions and 9 deletions

View File

@@ -720,7 +720,7 @@ fn optimize_stmt(stmt: &mut Stmt, state: &mut OptimizerState, preserve_result: b
// Remove all entries after a `true` condition
if let Some(n) = list
.iter()
.find(|&&index| expressions[index].is_always_true())
.position(|&index| expressions[index].is_always_true())
{
if n + 1 < list.len() {
state.set_dirty();