🚧 make clippy happy

This commit is contained in:
Vladislav Nepogodin 2022-09-04 18:59:01 +04:00
parent 801b788c8b
commit 1868467e5f
No known key found for this signature in database
GPG Key ID: B62C3D10C54D5DA9
2 changed files with 6 additions and 6 deletions

View File

@ -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);
}

View File

@ -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::<String>(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;
}