From a2066ced1fb3bf782514a439ad0981fcb1f0df51 Mon Sep 17 00:00:00 2001 From: Melody Horn Date: Thu, 1 Apr 2021 12:36:14 -0600 Subject: don't put duplicates on the queue --- bird-machine-macros/src/dfa.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'bird-machine-macros') diff --git a/bird-machine-macros/src/dfa.rs b/bird-machine-macros/src/dfa.rs index 0aec059..6f5e6f7 100644 --- a/bird-machine-macros/src/dfa.rs +++ b/bird-machine-macros/src/dfa.rs @@ -49,7 +49,7 @@ impl From for LabeledDFA> { } for states in next_table.values() { - if !transition_table.contains_key(states) { + if !transition_table.contains_key(states) && !queue.contains(states) { queue.push_back(states.clone()); } } -- cgit v1.2.3