Skip to content

Conversation

@jeckersb
Copy link
Collaborator

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

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>
@github-actions github-actions bot added the area/ostree Issues related to ostree label Dec 16, 2025
@bootc-bot bootc-bot bot requested a review from ckyrouac December 16, 2025 21:35
Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request correctly addresses a unused_assignments warning from the Rust compiler. The change is idiomatic, using _ to ignore the unused value from the struct destructuring and then shadowing the variable with a let binding. This is a clean and effective way to resolve the warning. The change is minimal and improves the code by removing the compiler warning. I have no further suggestions.

@jeckersb
Copy link
Collaborator Author

Well, rust 1.92, but I'm not going to retrigger CI on an obvious typo 😄

@cgwalters cgwalters enabled auto-merge (rebase) December 16, 2025 23:07
@cgwalters cgwalters merged commit 39b64e1 into bootc-dev:main Dec 16, 2025
33 of 47 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/ostree Issues related to ostree

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants