Skip to content

Commit 33459e8

Browse files
committed
fix: appease clippy 1.80.0
It now detect unneeded cfg attributes (nice!) and complained about some deadcode that wasn't actually dead. Signed-off-by: Patrick Roy <roypat@amazon.co.uk>
1 parent 7bcb684 commit 33459e8

File tree

5 files changed

+2
-6
lines changed

5 files changed

+2
-6
lines changed

benches/aarch64/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ fn create_guest_memory() -> GuestMemoryMmap {
2222
}
2323

2424
#[derive(Clone, Copy, Default)]
25+
#[allow(dead_code)]
2526
pub struct FdtPlaceholder([u8; FDT_MAX_SIZE]);
2627

2728
// SAFETY: The layout of the structure is fixed and can be initialized by

src/configurator/aarch64/fdt.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,7 @@ mod tests {
106106
}
107107

108108
#[derive(Clone, Copy, Default)]
109+
#[allow(dead_code)] // rustc thinks the field is never read, but it is via `ByteValued` impl
109110
struct FdtPlaceholder([u8; FDT_MAX_SIZE]);
110111
unsafe impl ByteValued for FdtPlaceholder {}
111112

src/configurator/aarch64/mod.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,4 @@
44

55
//! Traits and structs for configuring and loading boot parameters on `aarch64`.
66
7-
#![cfg(target_arch = "aarch64")]
8-
97
pub mod fdt;

src/loader/aarch64/mod.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,5 @@
99

1010
//! Traits and structs for loading `aarch64` kernels into guest memory.
1111
12-
#![cfg(target_arch = "aarch64")]
13-
1412
#[cfg(feature = "pe")]
1513
pub mod pe;

src/loader/aarch64/pe/mod.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,6 @@
1010

1111
//! Traits and structs for loading pe image kernels into guest memory.
1212
13-
#![cfg(feature = "pe")]
14-
1513
use std::fmt;
1614
use std::io::{Read, Seek, SeekFrom};
1715

0 commit comments

Comments
 (0)