clippy: fix new lints on nightly

Signed-off-by: Dave Tucker <dave@dtucker.co.uk>
pull/276/head
Dave Tucker 3 years ago
parent 3262f85925
commit 4a32e7d985

@ -60,7 +60,7 @@ unsafe impl<T: Pod, const N: usize> Pod for [T; N] {}
#[allow(non_camel_case_types)] #[allow(non_camel_case_types)]
#[repr(C)] #[repr(C)]
#[derive(Copy, Clone, Debug, Default, PartialEq)] #[derive(Copy, Clone, Debug, Default, PartialEq, Eq)]
pub(crate) struct bpf_map_def { pub(crate) struct bpf_map_def {
// minimum features required by old BPF programs // minimum features required by old BPF programs
pub(crate) map_type: u32, pub(crate) map_type: u32,
@ -74,7 +74,7 @@ pub(crate) struct bpf_map_def {
} }
#[repr(u32)] #[repr(u32)]
#[derive(Copy, Clone, Debug, PartialEq)] #[derive(Copy, Clone, Debug, PartialEq, Eq)]
pub(crate) enum PinningType { pub(crate) enum PinningType {
None = 0, None = 0,
#[allow(dead_code)] // ByName is constructed from the BPF side #[allow(dead_code)] // ByName is constructed from the BPF side

@ -75,7 +75,7 @@ pub enum PerfBufferError {
} }
/// Return type of `read_events()`. /// Return type of `read_events()`.
#[derive(Debug, PartialEq)] #[derive(Debug, PartialEq, Eq)]
pub struct Events { pub struct Events {
/// The number of events read. /// The number of events read.
pub read: usize, pub read: usize,

@ -51,7 +51,7 @@ pub struct Object {
pub(crate) text_section_index: Option<usize>, pub(crate) text_section_index: Option<usize>,
} }
#[derive(Debug, Clone, PartialEq)] #[derive(Debug, Clone, PartialEq, Eq)]
pub(crate) enum MapKind { pub(crate) enum MapKind {
Bss, Bss,
Data, Data,
@ -942,7 +942,7 @@ fn parse_version(data: &[u8], endianness: object::Endianness) -> Result<KernelVe
}) })
} }
#[derive(Copy, Clone, Debug, PartialEq)] #[derive(Copy, Clone, Debug, PartialEq, Eq)]
pub enum KernelVersion { pub enum KernelVersion {
Version(u32), Version(u32),
Any, Any,

@ -559,7 +559,7 @@ struct NlAttr<'a> {
data: &'a [u8], data: &'a [u8],
} }
#[derive(Debug, Error, PartialEq)] #[derive(Debug, Error, PartialEq, Eq)]
enum NlAttrError { enum NlAttrError {
#[error("invalid buffer size `{size}`, expected `{expected}`")] #[error("invalid buffer size `{size}`, expected `{expected}`")]
InvalidBufferLength { size: usize, expected: usize }, InvalidBufferLength { size: usize, expected: usize },

@ -1,5 +1,5 @@
#[repr(u32)] #[repr(u32)]
#[derive(Copy, Clone, Debug, PartialEq)] #[derive(Copy, Clone, Debug, PartialEq, Eq)]
pub(crate) enum PinningType { pub(crate) enum PinningType {
None = 0, None = 0,
ByName = 1, ByName = 1,

Loading…
Cancel
Save