diff --git a/crates/cargo-test-support/src/compare.rs b/crates/cargo-test-support/src/compare.rs index 9a7f93bc557..22dadef53ef 100644 --- a/crates/cargo-test-support/src/compare.rs +++ b/crates/cargo-test-support/src/compare.rs @@ -149,32 +149,32 @@ fn add_common_redactions(subs: &mut snapbox::Redactions) { // For e2e tests subs.insert( "[ELAPSED]", - regex!("[FINISHED].*in (?[0-9]+(\\.[0-9]+))s"), + regex!(r"\[FINISHED\].*in (?[0-9]+(\.[0-9]+))s"), ) .unwrap(); // for UI tests subs.insert( "[ELAPSED]", - regex!("Finished.*in (?[0-9]+(\\.[0-9]+))s"), + regex!(r"Finished.*in (?[0-9]+(\.[0-9]+))s"), ) .unwrap(); // output from libtest subs.insert( "[ELAPSED]", - regex!("; finished in (?[0-9]+(\\.[0-9]+))s"), + regex!(r"; finished in (?[0-9]+(\.[0-9]+))s"), ) .unwrap(); subs.insert( "[FILE_SIZE]", - regex!("(?[0-9]+(\\.[0-9]+)([a-zA-Z]i)?)B"), + regex!(r"(?[0-9]+(\.[0-9]+)([a-zA-Z]i)?)B"), ) .unwrap(); subs.insert( "[HASH]", - regex!("home/\\.cargo/registry/src/-(?[a-z0-9]+)"), + regex!(r"home/\.cargo/registry/src/-(?[a-z0-9]+)"), ) .unwrap(); - subs.insert("[HASH]", regex!("/[a-z0-9\\-_]+-(?[0-9a-f]{16})")) + subs.insert("[HASH]", regex!(r"/[a-z0-9\-_]+-(?[0-9a-f]{16})")) .unwrap(); subs.insert("[HOST_TARGET]", rustc_host()).unwrap(); if let Some(alt_target) = try_alternate() { @@ -182,12 +182,12 @@ fn add_common_redactions(subs: &mut snapbox::Redactions) { } subs.insert( "[AVG_ELAPSED]", - regex!("(?[0-9]+(\\.[0-9]+)?) ns/iter"), + regex!(r"(?[0-9]+(\.[0-9]+)?) ns/iter"), ) .unwrap(); subs.insert( "[JITTER]", - regex!("ns/iter \\(\\+/- (?[0-9]+(\\.[0-9]+)?)\\)"), + regex!(r"ns/iter \(\+/- (?[0-9]+(\.[0-9]+)?)\)"), ) .unwrap(); }