mirror of
https://github.com/clap-rs/clap
synced 2024-12-13 06:12:40 +00:00
switch to regex 0.2 (#876)
Signed-off-by: Igor Gnatenko <ignatenko@redhat.com>
This commit is contained in:
parent
389658d945
commit
40052bdc0c
2 changed files with 4 additions and 4 deletions
|
@ -29,7 +29,7 @@ clippy = { version = "~0.0.112", optional = true }
|
|||
atty = { version = "0.2.2", optional = true }
|
||||
|
||||
[dev-dependencies]
|
||||
regex = "~0.1.80"
|
||||
regex = "0.2"
|
||||
|
||||
[features]
|
||||
default = ["suggestions", "color", "wrap_help"]
|
||||
|
|
|
@ -12,8 +12,8 @@ mod test {
|
|||
S2: AsRef<str> {
|
||||
let re = Regex::new("\x1b[^m]*m").unwrap();
|
||||
// Strip out any mismatching \r character on windows that might sneak in on either side
|
||||
let left = re.replace_all(&l.as_ref().trim().replace("\r", "")[..], "");
|
||||
let right = re.replace_all(&r.as_ref().trim().replace("\r", "")[..], "");
|
||||
let left = re.replace_all(&l.as_ref().trim().replace("\r", "")[..], "").into_owned();
|
||||
let right = re.replace_all(&r.as_ref().trim().replace("\r", "")[..], "").into_owned();
|
||||
let b = left == right;
|
||||
if !b {
|
||||
println!("");
|
||||
|
@ -69,4 +69,4 @@ mod test {
|
|||
.arg_from_usage("-o --option [scoption]... 'tests options'")
|
||||
.arg_from_usage("[scpositional] 'tests positionals'"))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue