summaryrefslogtreecommitdiffstats
path: root/src/output/icons.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/output/icons.rs')
-rw-r--r--src/output/icons.rs9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/output/icons.rs b/src/output/icons.rs
index 7af0a9f..1e8ad5f 100644
--- a/src/output/icons.rs
+++ b/src/output/icons.rs
@@ -8,6 +8,7 @@ pub trait FileIcon {
fn icon_file(&self, file: &File) -> Option<char>;
}
+#[derive(Copy, Clone)]
pub enum Icons {
Audio,
Image,
@@ -15,8 +16,8 @@ pub enum Icons {
}
impl Icons {
- pub fn value(&self) -> char {
- match *self {
+ pub fn value(self) -> char {
+ match self {
Self::Audio => '\u{f001}',
Self::Image => '\u{f1c5}',
Self::Video => '\u{f03d}',
@@ -25,9 +26,9 @@ impl Icons {
}
pub fn painted_icon(file: &File, style: &FileStyle) -> String {
- let file_icon = icon(&file).to_string();
+ let file_icon = icon(file).to_string();
let painted = style.exts
- .colour_file(&file)
+ .colour_file(file)
.map_or(file_icon.to_string(), |c| {
// Remove underline from icon
if c.is_underline {