Skip to content

Commit 027f0df

Browse files
committed
chore: Remove unused Diplay impl for MachineConfig
This Display implementation is unused, and furthermore just a duplicate of the automatically generated `Debug` implementation (which is a rust anti-pattern). Signed-off-by: Patrick Roy <[email protected]>
1 parent 06ebf77 commit 027f0df

File tree

1 file changed

+1
-12
lines changed

1 file changed

+1
-12
lines changed

src/vmm/src/vmm_config/machine_config.rs

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved.
22
// SPDX-License-Identifier: Apache-2.0
3-
use std::fmt::{self, Debug};
3+
use std::fmt::Debug;
44

55
use serde::{de, Deserialize, Serialize};
66

@@ -52,17 +52,6 @@ impl Default for MachineConfig {
5252
}
5353
}
5454

55-
impl fmt::Display for MachineConfig {
56-
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
57-
write!(
58-
f,
59-
"{{ \"vcpu_count\": {:?}, \"mem_size_mib\": {:?}, \"smt\": {:?}, \"cpu_template\": \
60-
{:?}, \"track_dirty_pages\": {:?} }}",
61-
self.vcpu_count, self.mem_size_mib, self.smt, self.cpu_template, self.track_dirty_pages
62-
)
63-
}
64-
}
65-
6655
/// Struct used in PATCH `/machine-config` API call.
6756
/// Used to update `VmConfig` in `VmResources`.
6857
/// This struct mirrors all the fields in `MachineConfig`.

0 commit comments

Comments
 (0)