From 0e4aec475ff2e9448196bce0b4598a983419974e Mon Sep 17 00:00:00 2001 From: Hanaasagi Date: Sun, 21 May 2023 13:57:48 +0900 Subject: [PATCH] fix(lint): remove useless `any` `all` in cfg. --- aya/src/maps/perf/async_perf_event_array.rs | 2 +- aya/src/maps/perf/mod.rs | 4 ++-- bpf/aya-bpf-cty/src/lib.rs | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/aya/src/maps/perf/async_perf_event_array.rs b/aya/src/maps/perf/async_perf_event_array.rs index 7e55889a..7e27b4f5 100644 --- a/aya/src/maps/perf/async_perf_event_array.rs +++ b/aya/src/maps/perf/async_perf_event_array.rs @@ -137,7 +137,7 @@ pub struct AsyncPerfEventArrayBuffer { async_fd: Async, } -#[cfg(any(feature = "async_tokio"))] +#[cfg(feature = "async_tokio")] impl + Borrow> AsyncPerfEventArrayBuffer { /// Reads events from the buffer. /// diff --git a/aya/src/maps/perf/mod.rs b/aya/src/maps/perf/mod.rs index db3c3005..334ba4c6 100644 --- a/aya/src/maps/perf/mod.rs +++ b/aya/src/maps/perf/mod.rs @@ -1,13 +1,13 @@ //! Ring buffer types used to receive events from eBPF programs using the linux `perf` API. //! //! See the [`PerfEventArray`](crate::maps::PerfEventArray) and [`AsyncPerfEventArray`](crate::maps::perf::AsyncPerfEventArray). -#[cfg(any(feature = "async"))] +#[cfg(feature = "async")] #[cfg_attr(docsrs, doc(cfg(feature = "async")))] mod async_perf_event_array; mod perf_buffer; mod perf_event_array; -#[cfg(any(feature = "async"))] +#[cfg(feature = "async")] #[cfg_attr(docsrs, doc(cfg(feature = "async")))] pub use async_perf_event_array::*; pub use perf_buffer::*; diff --git a/bpf/aya-bpf-cty/src/lib.rs b/bpf/aya-bpf-cty/src/lib.rs index 2588d86a..7828e0ee 100644 --- a/bpf/aya-bpf-cty/src/lib.rs +++ b/bpf/aya-bpf-cty/src/lib.rs @@ -15,7 +15,7 @@ pub use od::*; // PWD = Pointer Width Dependent pub use pwd::*; -#[cfg(any(target_arch = "bpf"))] +#[cfg(target_arch = "bpf")] mod ad { pub type c_int = i32; pub type c_uint = u32;