Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Abin Simon <[email protected]>
  • Loading branch information
poita66 and meain committed Nov 9, 2020
1 parent 68cd598 commit b6bd1d3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/icon.rs
Original file line number Diff line number Diff line change
Expand Up @@ -77,13 +77,13 @@ impl Icons {
"\u{f2dc}" // ""
} else if let Some(icon) = self
.icons_by_name
.get(String::from(name.file_name()).to_lowercase().as_str())
.get(name.file_name().to_lowercase().as_str())
{
// Use the known names.
icon
} else if let Some(icon) = name.extension().and_then(|extension| {
self.icons_by_extension
.get(String::from(extension).to_lowercase().as_str())
.get(extension.to_lowercase().as_str())
}) {
// Use the known extensions.
icon
Expand Down

0 comments on commit b6bd1d3

Please sign in to comment.