mirror of
https://github.com/uutils/coreutils
synced 2025-01-07 10:49:09 +00:00
mv: fix "needless borrow" clippy warnings
This commit is contained in:
parent
96ef306cb3
commit
7df36bb153
1 changed files with 3 additions and 3 deletions
|
@ -475,11 +475,11 @@ fn rename_symlink_fallback(from: &Path, to: &Path) -> io::Result<()> {
|
||||||
{
|
{
|
||||||
if path_symlink_points_to.exists() {
|
if path_symlink_points_to.exists() {
|
||||||
if path_symlink_points_to.is_dir() {
|
if path_symlink_points_to.is_dir() {
|
||||||
windows::fs::symlink_dir(&path_symlink_points_to, &to)?;
|
windows::fs::symlink_dir(&path_symlink_points_to, to)?;
|
||||||
} else {
|
} else {
|
||||||
windows::fs::symlink_file(&path_symlink_points_to, &to)?;
|
windows::fs::symlink_file(&path_symlink_points_to, to)?;
|
||||||
}
|
}
|
||||||
fs::remove_file(&from)?;
|
fs::remove_file(from)?;
|
||||||
} else {
|
} else {
|
||||||
return Err(io::Error::new(
|
return Err(io::Error::new(
|
||||||
io::ErrorKind::NotFound,
|
io::ErrorKind::NotFound,
|
||||||
|
|
Loading…
Reference in a new issue