From 1868467e5f32d8898847626be4b33a8677f3a772 Mon Sep 17 00:00:00 2001 From: Vladislav Nepogodin Date: Sun, 4 Sep 2022 18:59:01 +0400 Subject: [PATCH] =?UTF-8?q?=F0=9F=9A=A7=20make=20clippy=20happy?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/application_browser.rs | 6 +++--- src/main.rs | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/application_browser.rs b/src/application_browser.rs index 4a1c206..b978e68 100644 --- a/src/application_browser.rs +++ b/src/application_browser.rs @@ -137,7 +137,7 @@ impl ApplicationBrowser { if self.group_tofilter != "*" && self.group_tofilter != g_name { continue; } - if group["filter"].as_array() != None && !self.filter { + if group["filter"].as_array().is_some() && !self.filter { continue; } @@ -156,7 +156,7 @@ impl ApplicationBrowser { let app_name = String::from(app["pkg"].as_str().unwrap()); let mut status = localdb.pkg(app_name).is_ok(); - if app["filter"].as_array() != None && !self.filter { + if app["filter"].as_array().is_some() && !self.filter { continue; } @@ -373,7 +373,7 @@ fn on_button_press_event_tree_view( if let Some(coords) = event_btn.coords() { let (x, y) = coords; let path_info = treeview.path_at_pos(x as i32, y as i32); - if path_info == None { + if path_info.is_none() { return gtk::glib::signal::Inhibit(true); } diff --git a/src/main.rs b/src/main.rs index 895cd41..813e17c 100644 --- a/src/main.rs +++ b/src/main.rs @@ -363,7 +363,7 @@ fn set_locale(use_locale: &str) { let mut default_texts = json!(null); for method in elts.iter() { - if default_texts.get(method.0) == None { + if default_texts.get(method.0).is_none() { default_texts[method.0] = json![null]; } @@ -372,7 +372,7 @@ fn set_locale(use_locale: &str) { unsafe { let item: gtk::Widget = g_hello_window.clone().unwrap().builder.object(elt_value).unwrap(); - if default_texts[method.0].get(elt_value) == None { + if default_texts[method.0].get(elt_value).is_none() { let item_buf = item.property::(method.0.as_str()); default_texts[method.0][elt_value] = json!(item_buf); } @@ -403,7 +403,7 @@ fn set_locale(use_locale: &str) { "{}page", page.as_ref().unwrap().path().file_name().unwrap().to_str().unwrap() )); - if child == None { + if child.is_none() { eprintln!("child not found"); continue; }