Quellcode durchsuchen

refactor(clippy): clippy::implicit_clone

Signed-off-by: Christina Sørensen <christina@cafkafk.com>
Christina Sørensen vor 2 Jahren
Ursprung
Commit
edf825d659
1 geänderte Dateien mit 1 neuen und 1 gelöschten Zeilen
  1. 1 1
      src/output/file_name.rs

+ 1 - 1
src/output/file_name.rs

@@ -317,7 +317,7 @@ impl<'a, 'dir, C: Colours> FileName<'a, 'dir, C> {
     // and if that's the case then I think it's best to not try and generalize escape::escape to this case,
     // as this adaptation would incur some unneeded operations there
     pub fn escape_color_and_hyperlinks(&self, bits: &mut Vec<ANSIString<'_>>, good: Style, bad: Style) {
-        let string = self.file.name.to_owned();
+        let string = self.file.name.clone();
 
         if string.chars().all(|c| c >= 0x20 as char && c != 0x7f as char) {
             let painted = good.paint(string);