More clippy fixes
This commit is contained in:
parent
85ce87449f
commit
63e3860179
@ -5,7 +5,6 @@ use gtk::prelude::*;
|
||||
use gtk::Application;
|
||||
use ui::gtk::GtkLauncherUI;
|
||||
use waycast_core::WaycastLauncher;
|
||||
use waycast_plugins;
|
||||
|
||||
fn main() {
|
||||
let app = Application::builder()
|
||||
@ -15,16 +14,10 @@ fn main() {
|
||||
app.connect_activate(|app| {
|
||||
let mut file_search_plugin = waycast_plugins::file_search::new();
|
||||
|
||||
match file_search_plugin.add_search_path("/home/javi/working-files/DJ Music/") {
|
||||
Err(e) => eprintln!("{}", e),
|
||||
_ => (),
|
||||
}
|
||||
if let Err(e) = file_search_plugin.add_search_path("/home/javi/working-files/DJ Music/") { eprintln!("{}", e) }
|
||||
|
||||
let mut project_plugin = waycast_plugins::projects::new();
|
||||
match project_plugin.add_search_path("/home/javi/projects") {
|
||||
Err(e) => eprintln!("{}", e),
|
||||
_ => (),
|
||||
}
|
||||
if let Err(e) = project_plugin.add_search_path("/home/javi/projects") { eprintln!("{}", e) }
|
||||
|
||||
// Create the core launcher
|
||||
let launcher = WaycastLauncher::new()
|
||||
|
@ -142,12 +142,10 @@ impl GtkLauncherUI {
|
||||
Image::from_icon_name("application-x-executable")
|
||||
}
|
||||
}
|
||||
} else if let Some(default) = find_icon_file("vscode", "48", &icon_theme) {
|
||||
image = gtk::Image::from_file(default);
|
||||
} else {
|
||||
if let Some(default) = find_icon_file("vscode", "48", &icon_theme) {
|
||||
image = gtk::Image::from_file(default);
|
||||
} else {
|
||||
image = Image::from_icon_name("application-x-executable");
|
||||
}
|
||||
image = Image::from_icon_name("application-x-executable");
|
||||
}
|
||||
image.set_pixel_size(icon_size);
|
||||
image.set_widget_name("item-icon");
|
||||
@ -428,7 +426,7 @@ fn find_icon_file(
|
||||
for cat in &categories {
|
||||
let path = base
|
||||
.join(icon_theme.theme_name())
|
||||
.join(if !(size == "scalable".to_string()) {
|
||||
.join(if (size != "scalable") {
|
||||
format!("{}x{}", size, size)
|
||||
} else {
|
||||
size.to_string()
|
||||
@ -446,7 +444,7 @@ fn find_icon_file(
|
||||
for cat in &categories {
|
||||
let path = base
|
||||
.join("hicolor")
|
||||
.join(if !(size == "scalable".to_string()) {
|
||||
.join(if (size != "scalable") {
|
||||
format!("{}x{}", size, size)
|
||||
} else {
|
||||
size.to_string()
|
||||
|
@ -22,5 +22,5 @@ pub fn get_files_with_extension<P: AsRef<Path>>(
|
||||
files.push(f);
|
||||
}
|
||||
|
||||
return Ok(files);
|
||||
Ok(files)
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user