Skip to content

Commit 96d5b73

Browse files
committedMay 4, 2020
Fix compile warning
1 parent 0944ce6 commit 96d5b73

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed
 

‎src/cargo/sources/git/utils.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ use serde::Serialize;
1111
use std::env;
1212
use std::fmt;
1313
use std::fs::File;
14-
use std::mem;
1514
use std::path::{Path, PathBuf};
1615
use std::process::Command;
1716
use url::Url;
@@ -838,7 +837,7 @@ fn maybe_gc_repo(repo: &mut git2::Repository) -> CargoResult<()> {
838837
);
839838
if out.status.success() {
840839
let new = git2::Repository::open(repo.path())?;
841-
mem::replace(repo, new);
840+
*repo = new;
842841
return Ok(());
843842
}
844843
}

0 commit comments

Comments
 (0)
Please sign in to comment.