Skip to content

Commit

Permalink
Auto merge of #8138 - Dylan-DPC:fix/transmute_unused, r=alexcrichton
Browse files Browse the repository at this point in the history
fix mem replace unused

`mem::replace` will be linted as must_use, so modifying this.

This is currently blocking rust-lang/rust#71256
  • Loading branch information
bors committed Apr 20, 2020
2 parents 5b620dc + ee98c35 commit 6a41339
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 6a41339

Please sign in to comment.