]> git.proxmox.com Git - cargo.git/commitdiff
Explicitly ignore some results
authorvarkor <github@varkor.com>
Sat, 7 Sep 2019 13:51:25 +0000 (14:51 +0100)
committervarkor <github@varkor.com>
Sat, 7 Sep 2019 13:51:25 +0000 (14:51 +0100)
Use `let _ = ` to ignore some values that are `#[must_use]` when checking nested data types.

src/bin/cargo/commands/fetch.rs
src/cargo/ops/cargo_package.rs

index b07367bb65ebb0fb4a08c0ccafb7f8408a6a4356..0bac9153e5d70a554f6e05fc332c6a871f91ad43 100644 (file)
@@ -30,6 +30,6 @@ pub fn exec(config: &mut Config, args: &ArgMatches<'_>) -> CliResult {
         config,
         target: args.target(),
     };
-    ops::fetch(&ws, &opts)?;
+    let _ = ops::fetch(&ws, &opts)?;
     Ok(())
 }
index 16667fcdf0bb6b25cb174c3fb2edd9feed8f251c..cdf6dfe813685c775fd6882032d4344ac77ce9e9 100644 (file)
@@ -44,7 +44,7 @@ static VCS_INFO_FILE: &str = ".cargo_vcs_info.json";
 pub fn package(ws: &Workspace<'_>, opts: &PackageOpts<'_>) -> CargoResult<Option<FileLock>> {
     if ws.root().join("Cargo.lock").exists() {
         // Make sure the Cargo.lock is up-to-date and valid.
-        ops::resolve_ws(ws)?;
+        let _ = ops::resolve_ws(ws)?;
         // If Cargo.lock does not exist, it will be generated by `build_lock`
         // below, and will be validated during the verification step.
     }