summaryrefslogtreecommitdiff
path: root/ext/fs/std_fs.rs
diff options
context:
space:
mode:
Diffstat (limited to 'ext/fs/std_fs.rs')
-rw-r--r--ext/fs/std_fs.rs4
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.