From fdfdc9d0b40b796e135367bbd36b3059bbcf711c Mon Sep 17 00:00:00 2001 From: Gerardo Marset Date: Fri, 13 Sep 2024 23:21:35 +0100 Subject: [PATCH] Add prefilter() function to dense DFA --- regex-automata/src/dfa/dense.rs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/regex-automata/src/dfa/dense.rs b/regex-automata/src/dfa/dense.rs index ed37d3b84..4d8cc60bd 100644 --- a/regex-automata/src/dfa/dense.rs +++ b/regex-automata/src/dfa/dense.rs @@ -5151,3 +5151,10 @@ mod tests { assert_eq!(Err(expected), got); } } + +impl DFA { + /// Set or unset the prefilter attached to this DFA. + pub fn prefilter(&mut self, prefilter: Option) { + self.pre = prefilter + } +}