🧹 make clippy happy

This commit is contained in:
Vladislav Nepogodin 2023-03-21 00:29:15 +04:00
parent f89ec4bfd9
commit 4da552eb87
No known key found for this signature in database
GPG Key ID: B62C3D10C54D5DA9
2 changed files with 5 additions and 5 deletions

View File

@ -87,7 +87,7 @@ impl ApplicationBrowser {
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 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_combo = utils::create_combo_with_model(&group_store);
group_combo.connect_changed(on_group_filter_changed);

View File

@ -124,7 +124,7 @@ fn show_about_dialog() {
fn get_preferences() -> serde_json::Value {
let page_file = crate::embed_data::get("preferences.json").unwrap();
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> {
@ -419,7 +419,7 @@ fn set_locale(use_locale: &str) {
let item: &gtk::Widget = &builder_ref.object(objname).unwrap();
if method == &"label" {
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);
} else if method == &"tooltip_text" {
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());
}
pages::update_translations(&builder_ref);
pages::update_translations(builder_ref);
}
fn set_autostart(autostart: bool) {
@ -474,7 +474,7 @@ fn set_autostart(autostart: bool) {
#[inline]
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());
page.unwrap().to_owned()
}