chore(fs-util): remove redundant tmp_path clone (#19003)

This commit is contained in:
Skylar Ray
2025-10-16 13:10:11 +03:00
committed by GitHub
parent 386eaa3ff6
commit 5beeaedfae

View File

@@ -332,10 +332,7 @@ where
Err(err) => {
// Clean up the temporary file before returning the error
let _ = fs::remove_file(&tmp_path);
return Err(FsPathError::Write {
source: Error::other(err.into()),
path: tmp_path.clone(),
});
return Err(FsPathError::Write { source: Error::other(err.into()), path: tmp_path });
}
}