mirror of
https://github.com/microsoft/vscode.git
synced 2026-05-08 17:19:48 +01:00
Attempt to fix Rust clippy lint errors (#165377)
This commit is contained in:
@@ -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();
|
||||
|
||||
@@ -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
@@ -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())))?;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user