diff --git a/crates/fs-util/src/lib.rs b/crates/fs-util/src/lib.rs index d3195ad27f..08817aecfa 100644 --- a/crates/fs-util/src/lib.rs +++ b/crates/fs-util/src/lib.rs @@ -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 }); } }