Просмотр исходного кода

fix(theme): remove unnecessary map and make clippy happy

Signed-off-by: Sandro-Alessio Gierens <sandro@gierens.de>
Sandro-Alessio Gierens 1 год назад
Родитель
Сommit
28d7cf0b56
1 измененных файлов с 1 добавлено и 3 удалено
  1. 1 3
      src/theme/mod.rs

+ 1 - 3
src/theme/mod.rs

@@ -372,9 +372,7 @@ impl FileNameColours for Theme {
     fn executable_file(&self)     -> Style { self.ui.filekinds.executable }
     fn mount_point(&self)         -> Style { self.ui.filekinds.mount_point }
 
-    fn icon(&self) -> Option<Style> {
-        self.ui.icon.map_or(None, |icon| Some(icon))
-    }
+    fn icon(&self)          -> Option<Style> { self.ui.icon }
 
     fn colour_file(&self, file: &File<'_>) -> Style {
         self.exts