diff --git a/src/application.rs b/src/application.rs index 06adc95..78f43ea 100644 --- a/src/application.rs +++ b/src/application.rs @@ -106,6 +106,7 @@ glib::wrapper! { } // This is where the member functions of IvApplication go. +#[allow(clippy::new_without_default)] impl IvApplication { pub fn new() -> Self { glib::Object::new(&[ diff --git a/src/util.rs b/src/util.rs index 60c9547..002132a 100644 --- a/src/util.rs +++ b/src/util.rs @@ -1,7 +1,7 @@ use gio::prelude::*; use glib::translate::*; -pub fn utf8_collate_key_for_filename(filename: &String) -> String { +pub fn utf8_collate_key_for_filename(filename: &str) -> String { unsafe { from_glib_full(glib::ffi::g_utf8_collate_key_for_filename( filename.to_glib_none().0, diff --git a/src/widgets/image_view.rs b/src/widgets/image_view.rs index 11c6152..dd78c38 100644 --- a/src/widgets/image_view.rs +++ b/src/widgets/image_view.rs @@ -431,7 +431,7 @@ impl IvImageView { } async fn set_wallpaper(uri: String) { - match wallpaper::set_from_uri( + if let Err(e) = wallpaper::set_from_uri( &WindowIdentifier::default(), &uri, false, @@ -439,10 +439,9 @@ async fn set_wallpaper(uri: String) { ) .await { - Err(e) => log::error!( + log::error!( "Failed to set the wallpaper using the freedesktop portal: {}", e - ), - Ok(_) => (), + ); } }