Skip to content

Commit 9ac73ed

Browse files
add Default, PartialEq, Eq, Hash and Copy to FileIcon
1 parent bfc0620 commit 9ac73ed

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/icons.rs

+7-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ pub enum Theme {
4040
Dark,
4141
}
4242

43-
#[derive(Clone, Debug)]
43+
#[derive(Clone, Debug, PartialEq, Eq, Hash, Copy)]
4444
pub struct FileIcon {
4545
pub icon: char,
4646
pub color: &'static str,
@@ -52,6 +52,12 @@ impl Display for FileIcon {
5252
}
5353
}
5454

55+
impl Default for FileIcon {
56+
fn default() -> Self {
57+
DEFAULT_FILE_ICON
58+
}
59+
}
60+
5561
const DEFAULT_FILE_ICON: FileIcon = FileIcon {
5662
icon: '\u{f016}',
5763
color: "#7e8e91",

0 commit comments

Comments
 (0)