perf: reorder conditional operands
(cherry picked from commit 854f527f6e)
This commit is contained in:
parent
6f944de32f
commit
8bb33f7d8c
1 changed files with 1 additions and 1 deletions
|
|
@ -266,7 +266,7 @@ pub(super) fn flatten_grammar(
|
|||
let used = symbol_is_used(&variables, symbol);
|
||||
|
||||
for production in &variable.productions {
|
||||
if production.steps.is_empty() && used {
|
||||
if used && production.steps.is_empty() {
|
||||
Err(FlattenGrammarError::EmptyString(variable.name.clone()))?;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue