Skip to content

Commit

Permalink
tests: fixes lifetime issue in a test
Browse files Browse the repository at this point in the history
  • Loading branch information
kbknapp committed Feb 28, 2017
1 parent 5471b67 commit ceec86d
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions clap-test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,10 @@ mod test {
{
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 ls = l.as_ref().trim().replace("\r", "");
let rs = r.as_ref().trim().replace("\r", "");
let left = re.replace_all(&*ls, "");
let right = re.replace_all(&*rs, "");
let b = left == right;
if !b {
println!("");
Expand Down

0 comments on commit ceec86d

Please sign in to comment.