Skip to content

Commit

Permalink
chore: do clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
Decodetalkers committed Sep 6, 2024
1 parent b1bb3b3 commit 62a4194
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions iced_examples/application_launcher/src/applications.rs
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ fn get_icon_path_from_xdgicon(iconname: &str) -> Option<PathBuf> {
}
for prefix in ICONS_SIZE {
let iconpath =
xdg::BaseDirectories::with_prefix(&format!("icons/hicolor/{prefix}/apps")).unwrap();
xdg::BaseDirectories::with_prefix(format!("icons/hicolor/{prefix}/apps")).unwrap();
if let Some(iconpath) = iconpath.find_data_file(format!("{iconname}.png")) {
return Some(iconpath);
}
Expand All @@ -117,12 +117,12 @@ fn get_icon_path_from_xdgicon(iconname: &str) -> Option<PathBuf> {
}
for themes in THEMES_LIST {
let iconpath =
xdg::BaseDirectories::with_prefix(&format!("icons/{themes}/apps/48")).unwrap();
xdg::BaseDirectories::with_prefix(format!("icons/{themes}/apps/48")).unwrap();
if let Some(iconpath) = iconpath.find_data_file(format!("{iconname}.svg")) {
return Some(iconpath);
}
let iconpath =
xdg::BaseDirectories::with_prefix(&format!("icons/{themes}/apps/64")).unwrap();
xdg::BaseDirectories::with_prefix(format!("icons/{themes}/apps/64")).unwrap();
if let Some(iconpath) = iconpath.find_data_file(format!("{iconname}.svg")) {
return Some(iconpath);
}
Expand Down
6 changes: 3 additions & 3 deletions iced_examples/bottom_panel/src/applications.rs
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ fn get_icon_path_from_xdgicon(iconname: &str) -> Option<PathBuf> {
}
for prefix in ICONS_SIZE {
let iconpath =
xdg::BaseDirectories::with_prefix(&format!("icons/hicolor/{prefix}/apps")).unwrap();
xdg::BaseDirectories::with_prefix(format!("icons/hicolor/{prefix}/apps")).unwrap();
if let Some(iconpath) = iconpath.find_data_file(format!("{iconname}.png")) {
return Some(iconpath);
}
Expand All @@ -87,12 +87,12 @@ fn get_icon_path_from_xdgicon(iconname: &str) -> Option<PathBuf> {
}
for themes in THEMES_LIST {
let iconpath =
xdg::BaseDirectories::with_prefix(&format!("icons/{themes}/apps/48")).unwrap();
xdg::BaseDirectories::with_prefix(format!("icons/{themes}/apps/48")).unwrap();
if let Some(iconpath) = iconpath.find_data_file(format!("{iconname}.svg")) {
return Some(iconpath);
}
let iconpath =
xdg::BaseDirectories::with_prefix(&format!("icons/{themes}/apps/64")).unwrap();
xdg::BaseDirectories::with_prefix(format!("icons/{themes}/apps/64")).unwrap();
if let Some(iconpath) = iconpath.find_data_file(format!("{iconname}.svg")) {
return Some(iconpath);
}
Expand Down

0 comments on commit 62a4194

Please sign in to comment.