Skip to content

Commit eac7ec4

Browse files
roypatandreeaflorescu
authored andcommitted
Fix lints introduced in 1.68.2
- `Default` implementations for enums can now be derived in more cases. Signed-off-by: Patrick Roy <roypat@amazon.co.uk>
1 parent c2880b0 commit eac7ec4

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

src/loader/x86_64/elf/mod.rs

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ impl fmt::Display for Error {
104104

105105
impl std::error::Error for Error {}
106106

107-
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
107+
#[derive(Clone, Default, Copy, Debug, PartialEq, Eq)]
108108
/// Availability of PVH entry point in the kernel, which allows the VMM
109109
/// to use the PVH boot protocol to start guests.
110110
pub enum PvhBootCapability {
@@ -113,15 +113,10 @@ pub enum PvhBootCapability {
113113
/// PVH entry point is not present
114114
PvhEntryNotPresent,
115115
/// PVH entry point is ignored, even if available
116+
#[default]
116117
PvhEntryIgnored,
117118
}
118119

119-
impl Default for PvhBootCapability {
120-
fn default() -> Self {
121-
PvhBootCapability::PvhEntryIgnored
122-
}
123-
}
124-
125120
impl fmt::Display for PvhBootCapability {
126121
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
127122
use self::PvhBootCapability::*;

0 commit comments

Comments
 (0)