We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 52ad6b8 commit 1aee98aCopy full SHA for 1aee98a
src/cargo/sources/git/utils.rs
@@ -11,7 +11,6 @@ use serde::Serialize;
11
use std::env;
12
use std::fmt;
13
use std::fs::File;
14
-use std::mem;
15
use std::path::{Path, PathBuf};
16
use std::process::Command;
17
use url::Url;
@@ -835,7 +834,7 @@ fn maybe_gc_repo(repo: &mut git2::Repository) -> CargoResult<()> {
835
834
);
836
if out.status.success() {
837
let new = git2::Repository::open(repo.path())?;
838
- let _ = mem::replace(repo, new);
+ *repo = new;
839
return Ok(());
840
}
841
0 commit comments