Skip to content

Commit a2a1986

Browse files
committed
automata: fix sparse DFA state validation in no-std
The verified set isn't tracked in no-std/no-alloc because it is probably not worth doing (and bloating the size of the sparse DFA itself to store the state IDs). So when we deserialize a DFA without std enabled, the verified set of states was always reporting `false`, and this now trips an error 100% of the time in the new start state validation code. We fix this by always reporting `true`, thus treating every possible state ID as possibly valid on its own. Not great, but maintains the status quo.
1 parent 452bc32 commit a2a1986

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

regex-automata/src/dfa/sparse.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2540,7 +2540,7 @@ impl Seen {
25402540
}
25412541
fn insert(&mut self, _id: StateID) {}
25422542
fn contains(&self, _id: &StateID) -> bool {
2543-
false
2543+
true
25442544
}
25452545
}
25462546

0 commit comments

Comments
 (0)