cloud-hypervisor/arch
Rob Bradford 3baebc1af0 arch: x86_64: Fix clippy (needless_late_init) issue
warning: unneeded late initalization
   --> arch/src/x86_64/mod.rs:318:17
    |
318 |                 let reg_val: u32;
    |                 ^^^^^^^^^^^^^^^^^
    |
    = 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 `reg_val` here
    |
319 |                 let reg_val: u32 = match reg {
    |                 ++++++++++++++++++
help: remove the assignments from the `match` arms
    |
321 ~                         entry.eax
322 |                     }
323 |                     CpuidReg::EBX => {
324 ~                         entry.ebx
325 |                     }
326 |                     CpuidReg::ECX => {
  ...
help: add a semicolon after the `match` expression
    |
332 |                 };
    |                  +

warning: unneeded late initalization
   --> arch/src/x86_64/mod.rs:525:13
    |
525 |             let entry_compatible;
    |             ^^^^^^^^^^^^^^^^^^^^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_late_init
help: declare `entry_compatible` here
    |
526 |             let entry_compatible = match entry.compatible_check {
    |             ++++++++++++++++++++++
help: remove the assignments from the `match` arms
    |
530 ~                     src_vm_feature_bits_only == 0
531 |                 }
532 |                 CpuidCompatibleCheck::Equal => {
533 ~                     src_vm_feature == dest_vm_feature
534 |                 }
535 |                 CpuidCompatibleCheck::NumNotGreater => {

Signed-off-by: Rob Bradford <robert.bradford@intel.com>
2022-01-07 08:16:26 -08:00
..
src arch: x86_64: Fix clippy (needless_late_init) issue 2022-01-07 08:16:26 -08:00
Cargo.toml build: bump serde_derive from 1.0.132 to 1.0.133 2022-01-04 03:58:23 +00:00