misc: Fix Clippy hints - #194
Merged
phip1611 merged 3 commits intoAug 25, 2026
Merged
Conversation
Member
|
Probably because of the new rust (thus clippy) version released just the other day |
arctic-alpaca
left a comment
There was a problem hiding this comment.
Could you cherry pick the upstream commits for this instead?
Member
|
Pascal is OOO today according to the team calendar |
Member
|
Reopening, as Pascal cancelled his vacation. Please fix this today so we can move forward. |
Author
|
I'm on it. |
```
warning: using `chunks_exact` with a constant chunk size
--> block/src/formats/qcow/internal/header.rs:253:39
|
253 | for entry in data.chunks_exact(FEATURE_NAME_ENTRY_SIZE) {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `as_chunks` instead
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#chunks_exact_to_as_chunks
= note: `-D clippy::chunks-exact-to-as-chunks` implied by `-D clippy::all`
```
Signed-off-by: Rob Bradford <rbradford@meta.com>
scholzp
force-pushed
the
fix_clippy_hints
branch
from
August 25, 2026 08:03
c5f88fc to
2cf16ad
Compare
```
warning: you seem to be trying to move all elements into a new `Vec`
--> pci/src/configuration.rs:951:24
|
951 | return self.pending_bar_reprogram.drain(..).collect();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `mem::take` to avoid creating a new allocation: `std::mem::take(&mut self.pending_bar_reprogram)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#drain_collect
= note: `-D clippy::drain-collect` implied by `-D clippy::all`
```
Signed-off-by: Rob Bradford <rbradford@meta.com>
On-behalf-of: SAP pascal.scholz@sap.com
Signed-off-by: Pascal Scholz <pascal.scholz@cyberus-technology.de>
```
warning: unneeded late initialization
--> devices/src/legacy/gpio_pl061.rs:258:9
|
258 | let value;
| ^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_late_init
= note: `-D clippy::needless-late-init` implied by `-D clippy::all`
```
Signed-off-by: Rob Bradford <rbradford@meta.com>
scholzp
force-pushed
the
fix_clippy_hints
branch
from
August 25, 2026 08:31
2cf16ad to
5941498
Compare
Author
|
I backported the upstream commits and updated the PR's description accordingly. |
arctic-alpaca
approved these changes
Aug 25, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Somehow my other PR (#190) raised some Clippy hints on code it never touched.
Here is the backport of the corresponding upstream PR. The backport contains only parts relevant to us. This means:
qcow_raw_file.rsfrom the first commit, as we deleted the file