Attempt to fix Rust clippy lint errors (#165377)

This commit is contained in:
Joyce Er
2022-11-03 08:19:58 -07:00
committed by GitHub
parent 4608b378a8
commit fe5f564db1
3 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -150,7 +150,7 @@ fn copy_file_metadata(from: &Path, to: &Path) -> Result<(), std::io::Error> {
use std::os::unix::fs::MetadataExt;
let metadata = from.metadata()?;
fs::set_permissions(&to, metadata.permissions())?;
fs::set_permissions(to, metadata.permissions())?;
// based on coreutils' chown https://github.com/uutils/coreutils/blob/72b4629916abe0852ad27286f4e307fbca546b6e/src/chown/chown.rs#L266-L281
let s = std::ffi::CString::new(to.as_os_str().as_bytes()).unwrap();
+1 -1
View File
@@ -352,7 +352,7 @@ fn install_server(
unzip_downloaded_release(compressed_file, &paths.server_dir, SilentCopyProgress())?;
match fs::remove_file(&compressed_file) {
match fs::remove_file(compressed_file) {
Ok(()) => {}
Err(e) => {
if e.kind() != ErrorKind::NotFound {
+1 -1
View File
@@ -87,7 +87,7 @@ where
});
if let Some(p) = path.parent() {
fs::create_dir_all(&p)
fs::create_dir_all(p)
.map_err(|e| wrap(e, format!("could not create dir for {}", p.display())))?;
}