From 106b67742e2aa6f94ccc7b149087ea897515bfb8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=94=D0=B0=D0=BC=D1=98=D0=B0=D0=BD=20=D0=93=D0=B5=D0=BE?= =?UTF-8?q?=D1=80=D0=B3=D0=B8=D0=B5=D0=B2=D1=81=D0=BA=D0=B8?= Date: Fri, 9 Sep 2022 15:03:27 +0200 Subject: [PATCH] clippy: single-character string constant used as pattern https://rust-lang.github.io/rust-clippy/master/index.html#single_char_pattern --- src/directory_listing.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/directory_listing.rs b/src/directory_listing.rs index 907dc65..4b8c916 100644 --- a/src/directory_listing.rs +++ b/src/directory_listing.rs @@ -31,7 +31,7 @@ pub fn directory_listing( if dir.is_visible(&entry) { let entry = entry.unwrap(); let p = match entry.path().strip_prefix(&dir.path) { - Ok(p) if cfg!(windows) => base.join(p).to_string_lossy().replace("\\", "/"), + Ok(p) if cfg!(windows) => base.join(p).to_string_lossy().replace('\\', "/"), Ok(p) => base.join(p).to_string_lossy().into_owned(), Err(_) => continue, };