clippy: single-character string constant used as pattern

https://rust-lang.github.io/rust-clippy/master/index.html#single_char_pattern
This commit is contained in:
Дамјан Георгиевски 2022-09-09 15:03:27 +02:00
parent 0736d656a4
commit 106b67742e

View file

@ -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,
};