Skip to content

Commit fe5f564

Browse files
authored
Attempt to fix Rust clippy lint errors (microsoft#165377)
1 parent 4608b37 commit fe5f564

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

cli/src/self_update.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ fn copy_file_metadata(from: &Path, to: &Path) -> Result<(), std::io::Error> {
150150
use std::os::unix::fs::MetadataExt;
151151

152152
let metadata = from.metadata()?;
153-
fs::set_permissions(&to, metadata.permissions())?;
153+
fs::set_permissions(to, metadata.permissions())?;
154154

155155
// based on coreutils' chown https://github.com/uutils/coreutils/blob/72b4629916abe0852ad27286f4e307fbca546b6e/src/chown/chown.rs#L266-L281
156156
let s = std::ffi::CString::new(to.as_os_str().as_bytes()).unwrap();

cli/src/tunnels/code_server.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -352,7 +352,7 @@ fn install_server(
352352

353353
unzip_downloaded_release(compressed_file, &paths.server_dir, SilentCopyProgress())?;
354354

355-
match fs::remove_file(&compressed_file) {
355+
match fs::remove_file(compressed_file) {
356356
Ok(()) => {}
357357
Err(e) => {
358358
if e.kind() != ErrorKind::NotFound {

cli/src/util/tar.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ where
8787
});
8888

8989
if let Some(p) = path.parent() {
90-
fs::create_dir_all(&p)
90+
fs::create_dir_all(p)
9191
.map_err(|e| wrap(e, format!("could not create dir for {}", p.display())))?;
9292
}
9393

0 commit comments

Comments
 (0)