Skip to content

Commit bedf6f4

Browse files
committed
More clippy fixes
Signed-off-by: Babis Chalios <[email protected]>
1 parent 84c7b90 commit bedf6f4

File tree

4 files changed

+5
-7
lines changed

4 files changed

+5
-7
lines changed

src/vmm/benches/main.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,6 @@ use vmm::persist::{MicrovmState, VmInfo};
2020
use vmm::utilities::mock_resources::NOISY_KERNEL_IMAGE;
2121
use vmm::utilities::test_utils::create_vmm;
2222
use vmm::version_map::VERSION_MAP;
23-
use vmm::vmm_config::boot_source::BootSourceConfig;
24-
use vmm::vmm_config::machine_config::CpuFeaturesTemplate;
2523
use vmm::vmm_config::snapshot::{CreateSnapshotParams, SnapshotType};
2624
use vmm::{persist, FcExitCode};
2725

@@ -80,7 +78,7 @@ fn create_microvm_state(is_diff: bool) -> MicrovmState {
8078
mem_file_path: memory_file.as_path().to_path_buf(),
8179
version: None,
8280
};
83-
let mut vm_info = VmInfo {
81+
let vm_info = VmInfo {
8482
mem_size_mib: 1u64,
8583
..Default::default()
8684
};
@@ -89,7 +87,7 @@ fn create_microvm_state(is_diff: bool) -> MicrovmState {
8987
let mut locked_vmm = vmm.lock().unwrap();
9088
persist::create_snapshot(
9189
&mut locked_vmm,
92-
&mut vm_info,
90+
&vm_info,
9391
&snapshot_params,
9492
VERSION_MAP.clone(),
9593
)

src/vmm/src/persist.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ use crate::{mem_size_mib, memory_snapshot, vstate, Error as VmmError, EventManag
4848
const FC_V0_23_MAX_DEVICES: u32 = 11;
4949

5050
/// Holds information related to the VM that is not part of VmState.
51-
#[derive(Clone, Debug, Default, PartialEq, Versionize, Serialize)]
51+
#[derive(Clone, Debug, Default, PartialEq, Eq, Versionize, Serialize)]
5252
// NOTICE: Any changes to this structure require a snapshot version bump.
5353
pub struct VmInfo {
5454
/// Guest memory size.

src/vmm/src/vmm_config/boot_source.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ pub const DEFAULT_KERNEL_CMDLINE: &str = "reboot=k panic=1 pci=off nomodules 825
2424

2525
/// Strongly typed data structure used to configure the boot source of the
2626
/// microvm.
27-
#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize, Versionize)]
27+
#[derive(Clone, Debug, Default, Deserialize, Eq, PartialEq, Serialize, Versionize)]
2828
#[serde(deny_unknown_fields)]
2929
pub struct BootSourceConfig {
3030
/// Path of the kernel image.

src/vmm/src/vmm_config/machine_config.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ where
238238

239239
/// Template types available for configuring the CPU features that map
240240
/// to EC2 instances.
241-
#[derive(Clone, Copy, Debug, Deserialize, PartialEq, Serialize, Versionize)]
241+
#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize, Versionize)]
242242
pub enum CpuFeaturesTemplate {
243243
/// C3 Template.
244244
C3,

0 commit comments

Comments
 (0)