mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2024-12-22 13:45:20 +00:00
afe798fc19
This patch fixes following warnings: error: boolean to int conversion using if --> vmm/src/vm.rs:866:42 | | .create_vm_with_type(if sev_snp_enabled.into() { | __________________________________________^ | | 1 // SEV_SNP_ENABLED | | } else { | | 0 // SEV_SNP_DISABLED | | }) | |_____________________^ help: replace with from: `u64::from(sev_snp_enabled.into())` | = note: `-D clippy::bool-to-int-with-if` implied by `-D warnings` = note: `sev_snp_enabled.into() as u64` or `sev_snp_enabled.into().into()` can also be valid options = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_to_int_with_if error: useless conversion to the same type: `bool` --> vmm/src/vm.rs:866:45 | | .create_vm_with_type(if sev_snp_enabled.into() { | ^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `.into()`: `sev_snp_enabled` | = note: `-D clippy::useless-conversion` implied by `-D warnings` = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion error: could not compile `vmm` due to 2 previous errors Signed-off-by: Muminul Islam <muislam@microsoft.com> |
||
---|---|---|
.. | ||
src | ||
Cargo.toml |