-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Labels
refactoringChanges to code structure without changing the outputChanges to code structure without changing the output
Milestone
Description
This HashMap should be static to avoid creating it for every comparison of BinaryOperator.
Lines 167 to 173 in d1d81e1
let mut precedence = HashMap::new(); | |
precedence.insert(BinaryOperator::Less, 10); | |
precedence.insert(BinaryOperator::Greater, 10); | |
precedence.insert(BinaryOperator::Add, 20); | |
precedence.insert(BinaryOperator::Subtract, 20); | |
precedence.insert(BinaryOperator::Multiply, 30); | |
precedence.insert(BinaryOperator::Divide, 30); |
Maybe use lazy_static.
Metadata
Metadata
Assignees
Labels
refactoringChanges to code structure without changing the outputChanges to code structure without changing the output