Skip to content

Commit

Permalink
cli: remove use of deprecated API
Browse files Browse the repository at this point in the history
I deprecated this API a couple releases ago. Update the `regex-cli` tool
to be in line with that.
  • Loading branch information
BurntSushi committed Aug 27, 2023
1 parent 329c6a3 commit 15cdc64
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions regex-cli/args/thompson.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,11 @@ impl Config {
pub fn reversed(&self) -> Config {
// Reverse DFAs require that captures are disabled. In practice, there
// is no current use case for a reverse NFA with capture groups.
let thompson = self.thompson.clone().reverse(true).captures(false);
let thompson = self
.thompson
.clone()
.reverse(true)
.which_captures(thompson::WhichCaptures::None);
Config { thompson }
}

Expand Down Expand Up @@ -67,7 +71,10 @@ impl Configurable for Config {
self.thompson = self.thompson.clone().shrink(true);
}
Arg::Long("no-captures") => {
self.thompson = self.thompson.clone().captures(false);
self.thompson = self
.thompson
.clone()
.which_captures(thompson::WhichCaptures::None);
}
Arg::Long("line-terminator") => {
let byte: flags::OneByte =
Expand Down

0 comments on commit 15cdc64

Please sign in to comment.