Fixing lint warnings

This commit is contained in:
Stephen Chung
2020-03-24 16:57:35 +08:00
parent 3ea482567f
commit d21f66b911
13 changed files with 87 additions and 76 deletions

View File

@@ -566,7 +566,7 @@ pub(crate) fn optimize<'a>(statements: Vec<Stmt>, engine: &Engine<'a>, scope: &S
// Add back the last statement unless it is a lone No-op
if let Some(stmt) = last_stmt {
if result.len() > 0 || !matches!(stmt, Stmt::Noop(_)) {
if !result.is_empty() || !matches!(stmt, Stmt::Noop(_)) {
result.push(stmt);
}
}