🧹 make clippy happy
This commit is contained in:
parent
f89ec4bfd9
commit
4da552eb87
|
@ -87,7 +87,7 @@ impl ApplicationBrowser {
|
||||||
crate::embed_data::get("application_utility/default.json").unwrap();
|
crate::embed_data::get("application_utility/default.json").unwrap();
|
||||||
let app_util_manifest = std::str::from_utf8(app_util_manifest_file.data.as_ref()).unwrap();
|
let app_util_manifest = std::str::from_utf8(app_util_manifest_file.data.as_ref()).unwrap();
|
||||||
let groups: serde_json::Value =
|
let groups: serde_json::Value =
|
||||||
serde_json::from_str(&app_util_manifest).expect("Unable to parse");
|
serde_json::from_str(app_util_manifest).expect("Unable to parse");
|
||||||
let group_store = load_groups_data(&groups);
|
let group_store = load_groups_data(&groups);
|
||||||
let group_combo = utils::create_combo_with_model(&group_store);
|
let group_combo = utils::create_combo_with_model(&group_store);
|
||||||
group_combo.connect_changed(on_group_filter_changed);
|
group_combo.connect_changed(on_group_filter_changed);
|
||||||
|
|
|
@ -124,7 +124,7 @@ fn show_about_dialog() {
|
||||||
fn get_preferences() -> serde_json::Value {
|
fn get_preferences() -> serde_json::Value {
|
||||||
let page_file = crate::embed_data::get("preferences.json").unwrap();
|
let page_file = crate::embed_data::get("preferences.json").unwrap();
|
||||||
let page = std::str::from_utf8(page_file.data.as_ref());
|
let page = std::str::from_utf8(page_file.data.as_ref());
|
||||||
serde_json::from_str(&page.unwrap()).expect("Unable to parse")
|
serde_json::from_str(page.unwrap()).expect("Unable to parse")
|
||||||
}
|
}
|
||||||
|
|
||||||
fn get_saved_locale() -> Option<String> {
|
fn get_saved_locale() -> Option<String> {
|
||||||
|
@ -419,7 +419,7 @@ fn set_locale(use_locale: &str) {
|
||||||
let item: >k::Widget = &builder_ref.object(objname).unwrap();
|
let item: >k::Widget = &builder_ref.object(objname).unwrap();
|
||||||
if method == &"label" {
|
if method == &"label" {
|
||||||
let translated_text =
|
let translated_text =
|
||||||
crate::localization::get_locale_text(utils::get_translation_msgid(&objname));
|
crate::localization::get_locale_text(utils::get_translation_msgid(objname));
|
||||||
item.set_property(method, &translated_text);
|
item.set_property(method, &translated_text);
|
||||||
} else if method == &"tooltip_text" {
|
} else if method == &"tooltip_text" {
|
||||||
let translated_text = if objname == &"about" {
|
let translated_text = if objname == &"about" {
|
||||||
|
@ -454,7 +454,7 @@ fn set_locale(use_locale: &str) {
|
||||||
label.set_markup(get_page(file_path.as_ref()).as_str());
|
label.set_markup(get_page(file_path.as_ref()).as_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
pages::update_translations(&builder_ref);
|
pages::update_translations(builder_ref);
|
||||||
}
|
}
|
||||||
|
|
||||||
fn set_autostart(autostart: bool) {
|
fn set_autostart(autostart: bool) {
|
||||||
|
@ -474,7 +474,7 @@ fn set_autostart(autostart: bool) {
|
||||||
|
|
||||||
#[inline]
|
#[inline]
|
||||||
fn get_page(file_path: &str) -> String {
|
fn get_page(file_path: &str) -> String {
|
||||||
let page_file = crate::embed_data::get(&file_path).unwrap();
|
let page_file = crate::embed_data::get(file_path).unwrap();
|
||||||
let page = std::str::from_utf8(page_file.data.as_ref());
|
let page = std::str::from_utf8(page_file.data.as_ref());
|
||||||
page.unwrap().to_owned()
|
page.unwrap().to_owned()
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue