Skip to content

Commit

Permalink
Merge pull request #12 from Araxeus/revert-9-use-fallback-for-emoji
Browse files Browse the repository at this point in the history
  • Loading branch information
Araxeus authored May 20, 2022
2 parents 791a2f6 + 0f4a22d commit 53c39ad
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 20 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 1 addition & 13 deletions src/structs/entry.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,7 @@ pub struct Entry {

impl fmt::Display for Entry {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(
f,
"{} {}",
console::Emoji(
self.icon.to_str(),
if self.filetype == Filetype::Directory {
"\\"
} else {
" "
}
),
self.name
)
write!(f, "{} {}", self.icon, self.name)
}
}

Expand Down
6 changes: 0 additions & 6 deletions src/structs/icons.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,6 @@ use std::fmt;

pub struct Icon(&'static str);

impl Icon {
pub const fn to_str(&self) -> &'static str {
self.0
}
}

impl fmt::Display for Icon {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.0)
Expand Down

0 comments on commit 53c39ad

Please sign in to comment.