general: clippy lint fixes

This commit is contained in:
Christopher Davis 2021-09-22 22:57:54 -07:00
parent 4fbf0e2203
commit 1687411536
3 changed files with 5 additions and 5 deletions

View file

@ -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(&[

View file

@ -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,

View file

@ -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(_) => (),
);
}
}