clippy: fix new lints on nightly

Signed-off-by: Dave Tucker <dave@dtucker.co.uk>
pull/276/head
Dave Tucker 2 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)]
#[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

@ -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,

@ -51,7 +51,7 @@ pub struct Object {
pub(crate) text_section_index: Option<usize>,
}
#[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<KernelVe
})
}
#[derive(Copy, Clone, Debug, PartialEq)]
#[derive(Copy, Clone, Debug, PartialEq, Eq)]
pub enum KernelVersion {
Version(u32),
Any,

@ -559,7 +559,7 @@ struct NlAttr<'a> {
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 },

@ -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,

Loading…
Cancel
Save