From 62a41943b557b3e003ff3318d34937de26133029 Mon Sep 17 00:00:00 2001 From: ShootingStarDragons Date: Sat, 7 Sep 2024 01:12:05 +0859 Subject: [PATCH] chore: do clippy --- iced_examples/application_launcher/src/applications.rs | 6 +++--- iced_examples/bottom_panel/src/applications.rs | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/iced_examples/application_launcher/src/applications.rs b/iced_examples/application_launcher/src/applications.rs index f05f737..acb4c57 100644 --- a/iced_examples/application_launcher/src/applications.rs +++ b/iced_examples/application_launcher/src/applications.rs @@ -103,7 +103,7 @@ fn get_icon_path_from_xdgicon(iconname: &str) -> Option { } 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); } @@ -117,12 +117,12 @@ fn get_icon_path_from_xdgicon(iconname: &str) -> Option { } 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); } diff --git a/iced_examples/bottom_panel/src/applications.rs b/iced_examples/bottom_panel/src/applications.rs index 2ad93bb..6e8fa21 100644 --- a/iced_examples/bottom_panel/src/applications.rs +++ b/iced_examples/bottom_panel/src/applications.rs @@ -73,7 +73,7 @@ fn get_icon_path_from_xdgicon(iconname: &str) -> Option { } 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); } @@ -87,12 +87,12 @@ fn get_icon_path_from_xdgicon(iconname: &str) -> Option { } 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); }