Skip to content

Commit

Permalink
Fix Clippy failures on Linux
Browse files Browse the repository at this point in the history
  • Loading branch information
rgwood committed Nov 26, 2022
1 parent 48cdc67 commit 538dea0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/freedesktop.rs
Expand Up @@ -242,7 +242,7 @@ where
} else {
std::fs::remove_file(&file).map_err(|e| fsys_err_to_unknown(&file, e))?;
}
std::fs::remove_file(info_file).map_err(|e| fsys_err_to_unknown(&info_file, e))?;
std::fs::remove_file(info_file).map_err(|e| fsys_err_to_unknown(info_file, e))?;
}

Ok(())
Expand All @@ -252,7 +252,7 @@ fn restorable_file_in_trash_from_info_file(info_file: impl AsRef<std::ffi::OsStr
let info_file = info_file.as_ref();
let trash_folder = Path::new(info_file).parent().unwrap().parent().unwrap();
let name_in_trash = Path::new(info_file).file_stem().unwrap();
trash_folder.join("files").join(&name_in_trash)
trash_folder.join("files").join(name_in_trash)
}

pub fn restore_all<I>(items: I) -> Result<(), Error>
Expand Down Expand Up @@ -308,7 +308,7 @@ where
});
}
std::fs::rename(&file, &original_path).map_err(|e| fsys_err_to_unknown(&file, e))?;
std::fs::remove_file(info_file).map_err(|e| fsys_err_to_unknown(&info_file, e))?;
std::fs::remove_file(info_file).map_err(|e| fsys_err_to_unknown(info_file, e))?;
}
Ok(())
}
Expand Down

0 comments on commit 538dea0

Please sign in to comment.