@@ -2,12 +2,12 @@ use std::io::{stdout, Write};
2
2
3
3
use {
4
4
anyhow:: Context ,
5
- lexopt:: { Arg , Parser } ,
5
+ lexopt:: Parser ,
6
6
regex_automata:: { HalfMatch , Input , MatchError , PatternID } ,
7
7
} ;
8
8
9
9
use crate :: {
10
- args:: { self , Configurable , Usage } ,
10
+ args,
11
11
util:: { self , Table } ,
12
12
} ;
13
13
@@ -49,43 +49,6 @@ ENGINES:
49
49
}
50
50
}
51
51
52
- #[ derive( Debug , Default ) ]
53
- struct Args {
54
- overlapping : bool ,
55
- }
56
-
57
- impl Configurable for Args {
58
- fn configure (
59
- & mut self ,
60
- _: & mut Parser ,
61
- arg : & mut Arg ,
62
- ) -> anyhow:: Result < bool > {
63
- match * arg {
64
- Arg :: Long ( "overlapping" ) => {
65
- self . overlapping = true ;
66
- }
67
- _ => return Ok ( false ) ,
68
- }
69
- Ok ( true )
70
- }
71
-
72
- fn usage ( & self ) -> & [ Usage ] {
73
- const USAGES : & [ Usage ] = & [ Usage :: new (
74
- "--overlapping" ,
75
- "Search for overlapping matches." ,
76
- r#"
77
- This flag enables overlapping mode, where the regex engine will attempt to find
78
- all possible matches reported by the underlying matcher.
79
-
80
- Generally this flag is used in conjunction with '--match-kind all'. If the
81
- match semantics are not set to compile all possible matches in the underlying
82
- automaton, then the results will likely be counter-intuitive.
83
- "# ,
84
- ) ] ;
85
- USAGES
86
- }
87
- }
88
-
89
52
fn run_regex ( p : & mut lexopt:: Parser ) -> anyhow:: Result < ( ) > {
90
53
const USAGE : & ' static str = "\
91
54
Executes a search for half matches using the top-level API regex engine.
0 commit comments