Code cleanup.

This commit is contained in:
Stephen Chung
2020-06-25 11:07:46 +08:00
parent ab60c2e1d2
commit 58c198776f
11 changed files with 61 additions and 50 deletions

View File

@@ -628,7 +628,7 @@ fn optimize(
// Add constants from the scope into the state
scope
.iter()
.to_iter()
.filter(|ScopeEntry { typ, expr, .. }| {
// Get all the constants with definite constant expressions
*typ == ScopeEntryType::Constant