perf: reorder conditional operands

(cherry picked from commit 854f527f6e)
This commit is contained in:
Will Lillis 2025-07-13 13:15:33 -04:00 committed by Christian Clason
parent 6f944de32f
commit 8bb33f7d8c

View file

@ -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()))?;
}