Skip to content

Commit d9ff576

Browse files
committed
Auto merge of #7340 - varkor:ignore-must_use-results, r=alexcrichton
Explicitly ignore some results Use `let _ = ` to ignore some values that are `#[must_use]` when checking nested data types. This is necessary to compile cargo without warnings under rust-lang/rust#62262.
2 parents ad9e421 + 829fd71 commit d9ff576

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/bin/cargo/commands/fetch.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,6 @@ pub fn exec(config: &mut Config, args: &ArgMatches<'_>) -> CliResult {
3030
config,
3131
target: args.target(),
3232
};
33-
ops::fetch(&ws, &opts)?;
33+
let _ = ops::fetch(&ws, &opts)?;
3434
Ok(())
3535
}

src/cargo/ops/cargo_package.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ static VCS_INFO_FILE: &str = ".cargo_vcs_info.json";
4444
pub fn package(ws: &Workspace<'_>, opts: &PackageOpts<'_>) -> CargoResult<Option<FileLock>> {
4545
if ws.root().join("Cargo.lock").exists() {
4646
// Make sure the Cargo.lock is up-to-date and valid.
47-
ops::resolve_ws(ws)?;
47+
let _ = ops::resolve_ws(ws)?;
4848
// If Cargo.lock does not exist, it will be generated by `build_lock`
4949
// below, and will be validated during the verification step.
5050
}

0 commit comments

Comments
 (0)