Skip to content

Commit 15cdc64

Browse files
committed
cli: remove use of deprecated API
I deprecated this API a couple releases ago. Update the `regex-cli` tool to be in line with that.
1 parent 329c6a3 commit 15cdc64

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

regex-cli/args/thompson.rs

+9-2
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,11 @@ impl Config {
2828
pub fn reversed(&self) -> Config {
2929
// Reverse DFAs require that captures are disabled. In practice, there
3030
// is no current use case for a reverse NFA with capture groups.
31-
let thompson = self.thompson.clone().reverse(true).captures(false);
31+
let thompson = self
32+
.thompson
33+
.clone()
34+
.reverse(true)
35+
.which_captures(thompson::WhichCaptures::None);
3236
Config { thompson }
3337
}
3438

@@ -67,7 +71,10 @@ impl Configurable for Config {
6771
self.thompson = self.thompson.clone().shrink(true);
6872
}
6973
Arg::Long("no-captures") => {
70-
self.thompson = self.thompson.clone().captures(false);
74+
self.thompson = self
75+
.thompson
76+
.clone()
77+
.which_captures(thompson::WhichCaptures::None);
7178
}
7279
Arg::Long("line-terminator") => {
7380
let byte: flags::OneByte =

0 commit comments

Comments
 (0)