Skip to content

Commit

Permalink
refactor: fix clippy::needless_borrows_for_generic_args on scan_and_p…
Browse files Browse the repository at this point in the history
…lan_directory_copy
  • Loading branch information
simongoricar committed Oct 26, 2024
1 parent d1b52fc commit 5e3f183
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/directory/prepared.rs
Original file line number Diff line number Diff line change
Expand Up @@ -619,13 +619,13 @@ fn scan_and_plan_directory_copy(
.unwrap_or(&resolved_symlink_path);


let resolved_symlink_path_exists = try_exists_without_follow(
&resolved_absolute_symlink_path,
)
.map_err(|error| DirectoryExecutionPlanError::UnableToAccess {
path: resolved_absolute_symlink_path.to_path_buf(),
error,
})?;
let resolved_symlink_path_exists =
try_exists_without_follow(resolved_absolute_symlink_path).map_err(|error| {
DirectoryExecutionPlanError::UnableToAccess {
path: resolved_absolute_symlink_path.to_path_buf(),
error,
}
})?;


if !resolved_symlink_path_exists {
Expand Down Expand Up @@ -711,7 +711,7 @@ fn scan_and_plan_directory_copy(
// Symbolic link is valid, we should look at the corresponding
// `symlink_behaviour` option.

let resolved_symlink_metadata = fs::metadata(&resolved_absolute_symlink_path)
let resolved_symlink_metadata = fs::metadata(resolved_absolute_symlink_path)
.map_err(|error| DirectoryExecutionPlanError::UnableToAccess {
path: resolved_symlink_path.clone(),
error,
Expand Down

0 comments on commit 5e3f183

Please sign in to comment.