diff options
author | Maybe Waffle <waffle.lapkin@gmail.com> | 2022-11-29 11:01:17 +0000 |
---|---|---|
committer | Maybe Waffle <waffle.lapkin@gmail.com> | 2022-12-01 17:34:43 +0000 |
commit | f2b97a8bfe23cdda293908e3c3e01f2613787168 (patch) | |
tree | a7fe31c1e002272731591d9f0e2337f19de420d3 /compiler/rustc_fs_util | |
parent | 9c0bc3028a575eece6d4e8fbc6624cb95b9c9893 (diff) | |
download | rust-f2b97a8bfe23cdda293908e3c3e01f2613787168.tar.gz |
Remove useless borrows and derefs
Diffstat (limited to 'compiler/rustc_fs_util')
-rw-r--r-- | compiler/rustc_fs_util/src/lib.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_fs_util/src/lib.rs b/compiler/rustc_fs_util/src/lib.rs index 63998bb6b00..a7dfce3b9b8 100644 --- a/compiler/rustc_fs_util/src/lib.rs +++ b/compiler/rustc_fs_util/src/lib.rs @@ -65,7 +65,7 @@ pub enum LinkOrCopy { pub fn link_or_copy<P: AsRef<Path>, Q: AsRef<Path>>(p: P, q: Q) -> io::Result<LinkOrCopy> { let p = p.as_ref(); let q = q.as_ref(); - match fs::remove_file(&q) { + match fs::remove_file(q) { Ok(()) => (), Err(err) if err.kind() == io::ErrorKind::NotFound => (), Err(err) => return Err(err), |