From 9b7663fce4512f297c31854e4430571f8127775a Mon Sep 17 00:00:00 2001 From: David Tolnay Date: Fri, 11 Feb 2022 21:55:22 -0800 Subject: [PATCH] Restore compatibility with rustc pre 1.56 --- src/normalize.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/normalize.rs b/src/normalize.rs index 748fd76..4d7e04b 100644 --- a/src/normalize.rs +++ b/src/normalize.rs @@ -383,7 +383,7 @@ fn replace_case_insensitive(line: &str, pattern: &str, replacement: &str) -> Str } let mut keep = &line[pos..pos + keep.len()]; if insert_replacement { - let end_of_maybe_path = keep.find([' ', ':'].as_slice()).unwrap_or(keep.len()); + let end_of_maybe_path = keep.find(&[' ', ':'][..]).unwrap_or(keep.len()); replaced.push_str(&keep[..end_of_maybe_path].replace('\\', "/")); pos += end_of_maybe_path; keep = &keep[end_of_maybe_path..];