Skip to content

Commit 3afaf94

Browse files
committed
Drop Serialize implementation on MachineConfigUpdate
We never make us of this, and I do not see where this ever _could_ be useful. Signed-off-by: Patrick Roy <[email protected]>
1 parent c182544 commit 3afaf94

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

src/vmm/src/vmm_config/machine_config.rs

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -129,30 +129,28 @@ impl Default for MachineConfig {
129129
/// All fields are optional, but at least one needs to be specified.
130130
/// If a field is `Some(value)` then we assume an update is requested
131131
/// for that field.
132-
#[derive(Clone, Default, Debug, PartialEq, Eq, Deserialize, Serialize)]
132+
#[derive(Clone, Default, Debug, PartialEq, Eq, Deserialize)]
133133
#[serde(deny_unknown_fields)]
134134
pub struct MachineConfigUpdate {
135135
/// Number of vcpu to start.
136-
#[serde(default, skip_serializing_if = "Option::is_none")]
136+
#[serde(default)]
137137
pub vcpu_count: Option<u8>,
138138
/// The memory size in MiB.
139-
#[serde(skip_serializing_if = "Option::is_none")]
140139
pub mem_size_mib: Option<usize>,
141140
/// Enables or disabled SMT.
142-
#[serde(default, skip_serializing_if = "Option::is_none")]
141+
#[serde(default)]
143142
pub smt: Option<bool>,
144143
/// A CPU template that it is used to filter the CPU features exposed to the guest.
145-
#[serde(default, skip_serializing_if = "Option::is_none")]
144+
#[serde(default)]
146145
pub cpu_template: Option<StaticCpuTemplate>,
147146
/// Enables or disables dirty page tracking. Enabling allows incremental snapshots.
148-
#[serde(skip_serializing_if = "Option::is_none")]
149147
pub track_dirty_pages: Option<bool>,
150148
/// Configures what page size Firecracker should use to back guest memory.
151-
#[serde(default, skip_serializing_if = "Option::is_none")]
149+
#[serde(default)]
152150
pub huge_pages: Option<HugePageConfig>,
153151
/// GDB socket address.
154152
#[cfg(feature = "gdb")]
155-
#[serde(default, skip_serializing_if = "Option::is_none")]
153+
#[serde(default)]
156154
pub gdb_socket_path: Option<String>,
157155
}
158156

0 commit comments

Comments
 (0)