🚧 make clippy happy
This commit is contained in:
parent
801b788c8b
commit
1868467e5f
|
@ -137,7 +137,7 @@ impl ApplicationBrowser {
|
||||||
if self.group_tofilter != "*" && self.group_tofilter != g_name {
|
if self.group_tofilter != "*" && self.group_tofilter != g_name {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if group["filter"].as_array() != None && !self.filter {
|
if group["filter"].as_array().is_some() && !self.filter {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -156,7 +156,7 @@ impl ApplicationBrowser {
|
||||||
let app_name = String::from(app["pkg"].as_str().unwrap());
|
let app_name = String::from(app["pkg"].as_str().unwrap());
|
||||||
let mut status = localdb.pkg(app_name).is_ok();
|
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;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -373,7 +373,7 @@ fn on_button_press_event_tree_view(
|
||||||
if let Some(coords) = event_btn.coords() {
|
if let Some(coords) = event_btn.coords() {
|
||||||
let (x, y) = coords;
|
let (x, y) = coords;
|
||||||
let path_info = treeview.path_at_pos(x as i32, y as i32);
|
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);
|
return gtk::glib::signal::Inhibit(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -363,7 +363,7 @@ fn set_locale(use_locale: &str) {
|
||||||
|
|
||||||
let mut default_texts = json!(null);
|
let mut default_texts = json!(null);
|
||||||
for method in elts.iter() {
|
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];
|
default_texts[method.0] = json![null];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -372,7 +372,7 @@ fn set_locale(use_locale: &str) {
|
||||||
unsafe {
|
unsafe {
|
||||||
let item: gtk::Widget =
|
let item: gtk::Widget =
|
||||||
g_hello_window.clone().unwrap().builder.object(elt_value).unwrap();
|
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());
|
let item_buf = item.property::<String>(method.0.as_str());
|
||||||
default_texts[method.0][elt_value] = json!(item_buf);
|
default_texts[method.0][elt_value] = json!(item_buf);
|
||||||
}
|
}
|
||||||
|
@ -403,7 +403,7 @@ fn set_locale(use_locale: &str) {
|
||||||
"{}page",
|
"{}page",
|
||||||
page.as_ref().unwrap().path().file_name().unwrap().to_str().unwrap()
|
page.as_ref().unwrap().path().file_name().unwrap().to_str().unwrap()
|
||||||
));
|
));
|
||||||
if child == None {
|
if child.is_none() {
|
||||||
eprintln!("child not found");
|
eprintln!("child not found");
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue