From 4a32e7d985de5b55f263cf9244791debb34cc00f Mon Sep 17 00:00:00 2001 From: Dave Tucker Date: Mon, 23 May 2022 11:36:46 +0100 Subject: [PATCH] clippy: fix new lints on nightly Signed-off-by: Dave Tucker --- aya/src/bpf.rs | 4 ++-- aya/src/maps/perf/perf_buffer.rs | 2 +- aya/src/obj/mod.rs | 4 ++-- aya/src/sys/netlink.rs | 2 +- bpf/aya-bpf/src/maps/mod.rs | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/aya/src/bpf.rs b/aya/src/bpf.rs index 8b3dee97..e410d15f 100644 --- a/aya/src/bpf.rs +++ b/aya/src/bpf.rs @@ -60,7 +60,7 @@ unsafe impl Pod for [T; N] {} #[allow(non_camel_case_types)] #[repr(C)] -#[derive(Copy, Clone, Debug, Default, PartialEq)] +#[derive(Copy, Clone, Debug, Default, PartialEq, Eq)] pub(crate) struct bpf_map_def { // minimum features required by old BPF programs pub(crate) map_type: u32, @@ -74,7 +74,7 @@ pub(crate) struct bpf_map_def { } #[repr(u32)] -#[derive(Copy, Clone, Debug, PartialEq)] +#[derive(Copy, Clone, Debug, PartialEq, Eq)] pub(crate) enum PinningType { None = 0, #[allow(dead_code)] // ByName is constructed from the BPF side diff --git a/aya/src/maps/perf/perf_buffer.rs b/aya/src/maps/perf/perf_buffer.rs index 285d99ec..6c22df17 100644 --- a/aya/src/maps/perf/perf_buffer.rs +++ b/aya/src/maps/perf/perf_buffer.rs @@ -75,7 +75,7 @@ pub enum PerfBufferError { } /// Return type of `read_events()`. -#[derive(Debug, PartialEq)] +#[derive(Debug, PartialEq, Eq)] pub struct Events { /// The number of events read. pub read: usize, diff --git a/aya/src/obj/mod.rs b/aya/src/obj/mod.rs index a8624c50..d71e3205 100644 --- a/aya/src/obj/mod.rs +++ b/aya/src/obj/mod.rs @@ -51,7 +51,7 @@ pub struct Object { pub(crate) text_section_index: Option, } -#[derive(Debug, Clone, PartialEq)] +#[derive(Debug, Clone, PartialEq, Eq)] pub(crate) enum MapKind { Bss, Data, @@ -942,7 +942,7 @@ fn parse_version(data: &[u8], endianness: object::Endianness) -> Result { data: &'a [u8], } -#[derive(Debug, Error, PartialEq)] +#[derive(Debug, Error, PartialEq, Eq)] enum NlAttrError { #[error("invalid buffer size `{size}`, expected `{expected}`")] InvalidBufferLength { size: usize, expected: usize }, diff --git a/bpf/aya-bpf/src/maps/mod.rs b/bpf/aya-bpf/src/maps/mod.rs index 2d8ba4c9..fc4f1732 100644 --- a/bpf/aya-bpf/src/maps/mod.rs +++ b/bpf/aya-bpf/src/maps/mod.rs @@ -1,5 +1,5 @@ #[repr(u32)] -#[derive(Copy, Clone, Debug, PartialEq)] +#[derive(Copy, Clone, Debug, PartialEq, Eq)] pub(crate) enum PinningType { None = 0, ByName = 1,