diff options
author | Bartek IwaĆczuk <biwanczuk@gmail.com> | 2023-05-07 22:43:16 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-07 20:43:16 +0000 |
commit | 7e1ae655720de72fd555bb1746bb35f5d17f39f6 (patch) | |
tree | 7e1b9ffe300d9344792a42ac9560a99b1122f67e /ext/fs/std_fs.rs | |
parent | 1de1a265fff438d9e299eec9ac2cedd47acde451 (diff) |
chore: lint ext/fs/std_fs.rs (#19036)
Diffstat (limited to 'ext/fs/std_fs.rs')
-rw-r--r-- | ext/fs/std_fs.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/fs/std_fs.rs b/ext/fs/std_fs.rs index fe6910f1b..6ac935bbd 100644 --- a/ext/fs/std_fs.rs +++ b/ext/fs/std_fs.rs @@ -434,7 +434,7 @@ fn copy_file(from: &Path, to: &Path) -> FsResult<()> { // Do a regular copy. fcopyfile() is an overkill for < 128KB // files. let mut buf = [0u8; 128 * 1024]; - let mut from_file = fs::File::open(&from)?; + let mut from_file = fs::File::open(from)?; let perm = from_file.metadata()?.permissions(); let mut to_file = fs::OpenOptions::new() @@ -443,7 +443,7 @@ fn copy_file(from: &Path, to: &Path) -> FsResult<()> { .write(true) .create(true) .truncate(true) - .open(&to)?; + .open(to)?; let writer_metadata = to_file.metadata()?; if writer_metadata.is_file() { // Set the correct file permissions, in case the file already existed. |