cloud-hypervisor/virtio-queue
Rob Bradford 2563b08ff0 virtio-queue: Fix clippy (needless_late_init) issue
warning: unneeded late initalization
   --> virtio-queue/src/chain.rs:381:13
    |
381 |             let desc: Descriptor;
    |             ^^^^^^^^^^^^^^^^^^^^^
    |
    = note: `#[warn(clippy::needless_late_init)]` on by default
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_late_init
help: declare `desc` here
    |
382 |             let desc: Descriptor = if i < 3 {
    |             ++++++++++++++++++++++
help: remove the assignments from the branches
    |
383 ~                 Descriptor::new(0x1000 * i as u64, 0x1000, VIRTQ_DESC_F_NEXT, i + 1)
384 |             } else {
385 ~                 Descriptor::new(0x1000 * i as u64, 0x1000, 0, 0)
    |
help: add a semicolon after the `if` expression
    |
386 |             };
    |              +

Signed-off-by: Rob Bradford <robert.bradford@intel.com>
2022-01-07 08:16:26 -08:00
..
src virtio-queue: Fix clippy (needless_late_init) issue 2022-01-07 08:16:26 -08:00
Cargo.toml virtio-queue: Update crate based on latest rust-vmm/vm-virtio 2022-01-06 10:02:40 +00:00