misc: Automatically fix cargo clippy issues added in 1.68 (beta)

Signed-off-by: Bo Chen <chen.bo@intel.com>
This commit is contained in:
Bo Chen
2023-01-25 14:08:38 -08:00
committed by Bo Chen
parent aaf67c9ae4
commit 574576c8e9
4 changed files with 14 additions and 50 deletions

View File

@@ -24,8 +24,9 @@ extern crate log;
#[allow(dead_code)]
#[repr(u16)]
#[derive(Clone, Copy, Debug)]
#[derive(Clone, Copy, Debug, Default)]
enum Command {
#[default]
Unknown = 0,
Version = 1,
DmaMap = 2,
@@ -43,28 +44,17 @@ enum Command {
UserDirtyPages = 14,
}
impl Default for Command {
fn default() -> Self {
Command::Unknown
}
}
#[allow(dead_code)]
#[repr(u32)]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Default)]
enum HeaderFlags {
#[default]
Command = 0,
Reply = 1,
NoReply = 1 << 4,
Error = 1 << 5,
}
impl Default for HeaderFlags {
fn default() -> Self {
HeaderFlags::Command
}
}
#[repr(C)]
#[derive(Default, Clone, Copy, Debug)]
struct Header {