clippy: Address the issue 'field is never read'

Issue from beta verion of clippy:

error: field is never read: `type`
   --> vmm/src/cpu.rs:235:5
    |
235 |     pub r#type: u8,
    |     ^^^^^^^^^^^^^^
    |
    = note: `-D dead-code` implied by `-D warnings`

Signed-off-by: Bo Chen <chen.bo@intel.com>
This commit is contained in:
Bo Chen 2021-06-23 14:54:20 -07:00 committed by Sebastien Boeuf
parent 5432cbfaad
commit 585269ecb9
2 changed files with 8 additions and 0 deletions

View File

@ -34,6 +34,7 @@ pub const ACPI_APIC_GENERIC_REDISTRIBUTOR: u8 = 14;
#[cfg(target_arch = "aarch64")]
pub const ACPI_APIC_GENERIC_TRANSLATOR: u8 = 15;
#[allow(dead_code)]
#[repr(packed)]
#[derive(Default)]
struct PciRangeEntry {
@ -44,6 +45,7 @@ struct PciRangeEntry {
_reserved: u32,
}
#[allow(dead_code)]
#[repr(packed)]
#[derive(Default)]
struct MemoryAffinity {
@ -60,6 +62,7 @@ struct MemoryAffinity {
_reserved3: u64,
}
#[allow(dead_code)]
#[repr(packed)]
#[derive(Default)]
struct ProcessorLocalX2ApicAffinity {
@ -109,6 +112,7 @@ impl MemoryAffinity {
}
}
#[allow(dead_code)]
#[repr(packed)]
#[derive(Default)]
struct ViotVirtioPciNode {
@ -120,6 +124,7 @@ struct ViotVirtioPciNode {
_reserved2: [u8; 8],
}
#[allow(dead_code)]
#[repr(packed)]
#[derive(Default)]
struct ViotPciRangeNode {

View File

@ -150,6 +150,7 @@ pub enum Error {
pub type Result<T> = result::Result<T, Error>;
#[cfg(all(target_arch = "x86_64", feature = "acpi"))]
#[allow(dead_code)]
#[repr(packed)]
struct LocalApic {
pub r#type: u8,
@ -159,6 +160,7 @@ struct LocalApic {
pub flags: u32,
}
#[allow(dead_code)]
#[repr(packed)]
#[derive(Default)]
struct Ioapic {
@ -227,6 +229,7 @@ struct GicIts {
pub reserved1: u32,
}
#[allow(dead_code)]
#[repr(packed)]
#[derive(Default)]
struct InterruptSourceOverride {