mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
tests: Fix clippy issue related to unnecessary enumerate()
error: you seem to use `.enumerate()` and immediately discard the index
--> cloud-hypervisor/tests/integration.rs:7675:72
|
7675 | for (_i, (offset, length)) in discard_operations.iter().enumerate() {
| ^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_enumerate_index
= note: `-D clippy::unused-enumerate-index` implied by `-D clippy::all`
= help: to override `-D clippy::all` add `#[allow(clippy::unused_enumerate_index)]`
help: remove the `.enumerate()` call
|
7675 - for (_i, (offset, length)) in discard_operations.iter().enumerate() {
7675 + for (offset, length) in discard_operations.iter() {
|
Signed-off-by: Rob Bradford <rbradford@meta.com>
This commit is contained in:
@@ -7673,7 +7673,7 @@ mod common_parallel {
|
||||
guest.ssh_command("sync").unwrap();
|
||||
|
||||
// Verify VM sees zeros in discarded regions
|
||||
for (_i, (offset, length)) in discard_operations.iter().enumerate() {
|
||||
for (offset, length) in discard_operations.iter() {
|
||||
assert_guest_disk_region_is_zero(&guest, "/dev/vdc", *offset, *length);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user