Skip to content

Commit

Permalink
Attempt to fix Rust clippy lint errors (#165377)
Browse files Browse the repository at this point in the history
  • Loading branch information
joyceerhl committed Nov 3, 2022
1 parent 4608b37 commit fe5f564
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion cli/src/self_update.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
2 changes: 1 addition & 1 deletion cli/src/tunnels/code_server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion cli/src/util/tar.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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())))?;
}

Expand Down

0 comments on commit fe5f564

Please sign in to comment.