-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor: Eliminate unused {Static,Custom}CpuTemplate variants #4391
Conversation
/// A CPU template that it is used to filter the CPU features exposed to the guest. | ||
#[serde(default, skip_serializing_if = "Option::is_none")] | ||
pub cpu_template: Option<StaticCpuTemplate>, | ||
#[serde( | ||
default, | ||
skip_serializing_if = "Option::is_none", | ||
deserialize_with = "some_option" | ||
)] | ||
pub cpu_template: Option<Option<StaticCpuTemplate>>, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: it might be worth noting why it is wrapped with two Options
(The outer Option
indicates whether cpu_template
field is provided or not, and the inner one indicates whether the given cpu_template
is "None" or a specific CPU template.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good point!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done :)
f335b52
to
4d1995b
Compare
They were needed for Versionize reasons, but with firecracker-microvm#4230 merged, we can eliminate them, simplifying the code. Signed-off-by: Patrick Roy <roypat@amazon.co.uk>
eacad79
to
b62cc65
Compare
Closing this, as removing the |
They were needed for Versionize reasons, but with #4230 merged, we can eliminate them, simplifying the code.
Changes
...
Reason
...
License Acceptance
By submitting this pull request, I confirm that my contribution is made under
the terms of the Apache 2.0 license. For more information on following
Developer Certificate of Origin and signing off your commits, please check
CONTRIBUTING.md
.PR Checklist
CHANGELOG.md
.TODO
s link to an issue.rust-vmm
.