summaryrefslogtreecommitdiff
path: root/cli/fs_util.rs
diff options
context:
space:
mode:
authorAaron O'Mullan <aaron.omullan@gmail.com>2022-11-17 22:59:10 -0300
committerGitHub <noreply@github.com>2022-11-18 02:59:10 +0100
commit238590aa9fdfe2aac04bb96abad2f2d2feb3101a (patch)
treef8fa04e39baecb5460076c1329ca38ae31f440b6 /cli/fs_util.rs
parent483c10c94b8a5de49cee4c4b9a3ce74726501c8a (diff)
chore: use Rust 1.65.0 (#16688)
Diffstat (limited to 'cli/fs_util.rs')
-rw-r--r--cli/fs_util.rs10
1 files changed, 5 insertions, 5 deletions
diff --git a/cli/fs_util.rs b/cli/fs_util.rs
index 843f5e0cf..dbebc75c0 100644
--- a/cli/fs_util.rs
+++ b/cli/fs_util.rs
@@ -333,9 +333,9 @@ pub async fn remove_dir_all_if_exists(path: &Path) -> std::io::Result<()> {
///
/// Note: Does not handle symlinks.
pub fn copy_dir_recursive(from: &Path, to: &Path) -> Result<(), AnyError> {
- std::fs::create_dir_all(&to)
+ std::fs::create_dir_all(to)
.with_context(|| format!("Creating {}", to.display()))?;
- let read_dir = std::fs::read_dir(&from)
+ let read_dir = std::fs::read_dir(from)
.with_context(|| format!("Reading {}", from.display()))?;
for entry in read_dir {
@@ -362,9 +362,9 @@ pub fn copy_dir_recursive(from: &Path, to: &Path) -> Result<(), AnyError> {
///
/// Note: Does not handle symlinks.
pub fn hard_link_dir_recursive(from: &Path, to: &Path) -> Result<(), AnyError> {
- std::fs::create_dir_all(&to)
+ std::fs::create_dir_all(to)
.with_context(|| format!("Creating {}", to.display()))?;
- let read_dir = std::fs::read_dir(&from)
+ let read_dir = std::fs::read_dir(from)
.with_context(|| format!("Reading {}", from.display()))?;
for entry in read_dir {
@@ -451,7 +451,7 @@ pub fn symlink_dir(oldpath: &Path, newpath: &Path) -> Result<(), AnyError> {
#[cfg(unix)]
{
use std::os::unix::fs::symlink;
- symlink(&oldpath, &newpath).map_err(err_mapper)?;
+ symlink(oldpath, newpath).map_err(err_mapper)?;
}
#[cfg(not(unix))]
{