refactor/polish ~ fix cargo clippy complaints (fatal/unneeded clone)

This commit is contained in:
Roy Ivy III 2019-12-20 11:38:15 -06:00
parent 6043ac1cbd
commit 181c9d6cae

View file

@ -1078,8 +1078,8 @@ fn copy_file(source: &Path, dest: &Path, options: &Options) -> CopyResult<()> {
CopyMode::Sparse => return Err(Error::NotImplemented(OPT_SPARSE.to_string())),
CopyMode::Update => {
if dest.exists() {
let src_metadata = fs::metadata(source.clone())?;
let dest_metadata = fs::metadata(dest.clone())?;
let src_metadata = fs::metadata(source)?;
let dest_metadata = fs::metadata(dest)?;
let src_time = src_metadata.modified()?;
let dest_time = dest_metadata.modified()?;