Skip to content

Commit

Permalink
Fix compile warning
Browse files Browse the repository at this point in the history
  • Loading branch information
alexcrichton committed May 4, 2020
1 parent 0944ce6 commit 96d5b73
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/cargo/sources/git/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ use serde::Serialize;
use std::env;
use std::fmt;
use std::fs::File;
use std::mem;
use std::path::{Path, PathBuf};
use std::process::Command;
use url::Url;
Expand Down Expand Up @@ -838,7 +837,7 @@ fn maybe_gc_repo(repo: &mut git2::Repository) -> CargoResult<()> {
);
if out.status.success() {
let new = git2::Repository::open(repo.path())?;
mem::replace(repo, new);
*repo = new;
return Ok(());
}
}
Expand Down

0 comments on commit 96d5b73

Please sign in to comment.