Skip to content

Commit 39b64e1

Browse files
jeckersbcgwalters
authored andcommitted
ostree-ext: Fix warning on rust 1.9.2
This started warning with: warning: value assigned to `no_signature_verification` is never read --> crates/ostree-ext/src/cli.rs:1265:21 | 1265 | mut no_signature_verification, | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: maybe it is overwritten before being read? = note: `#[warn(unused_assignments)]` (part of `#[warn(unused)]`) on by default Which is true in this case, we never actually read the pattern-matched value. Change it to be explicitly unused with '_' and then shadow it with a `let` binding. Signed-off-by: John Eckersberg <jeckersb@redhat.com>
1 parent 3c861fb commit 39b64e1

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

crates/ostree-ext/src/cli.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1262,7 +1262,7 @@ async fn run_from_opt(opt: Opt) -> Result<()> {
12621262
imgref,
12631263
image,
12641264
transport,
1265-
mut no_signature_verification,
1265+
no_signature_verification: _,
12661266
enforce_container_sigpolicy,
12671267
ostree_remote,
12681268
target_imgref,
@@ -1273,7 +1273,7 @@ async fn run_from_opt(opt: Opt) -> Result<()> {
12731273
} => {
12741274
// As of recent releases, signature verification enforcement is
12751275
// off by default, and must be explicitly enabled.
1276-
no_signature_verification = !enforce_container_sigpolicy;
1276+
let no_signature_verification = !enforce_container_sigpolicy;
12771277
let sysroot = &if let Some(sysroot) = sysroot {
12781278
ostree::Sysroot::new(Some(&gio::File::for_path(sysroot)))
12791279
} else {

0 commit comments

Comments
 (0)