From 429e3701c1816ab5d0bea14259644cca77c411cc Mon Sep 17 00:00:00 2001 From: ice_iix Date: Sun, 28 Aug 2022 07:24:49 -0700 Subject: [PATCH] Fix clippy::single_char_pattern --- src/console/mod.rs | 2 +- src/ui/logo.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/console/mod.rs b/src/console/mod.rs index aab12b8..28b0689 100644 --- a/src/console/mod.rs +++ b/src/console/mod.rs @@ -370,7 +370,7 @@ impl Console { } } - let mut file = &record.file().unwrap_or("").replace("\\", "/")[..]; + let mut file = &record.file().unwrap_or("").replace('\\', "/")[..]; if let Some(pos) = file.rfind("src/") { file = &file[pos + 4..]; } diff --git a/src/ui/logo.rs b/src/ui/logo.rs index b33f1ec..686d04a 100644 --- a/src/ui/logo.rs +++ b/src/ui/logo.rs @@ -99,7 +99,7 @@ impl Logo { let mut texts = String::new(); file.read_to_string(&mut texts).unwrap(); for line in texts.lines() { - text_strings.push(line.to_owned().replace("\r", "")); + text_strings.push(line.to_owned().replace('\r', "")); } } let mut r: rand_pcg::Pcg32 =