Skip to content

Commit d4bfd72

Browse files
authored
Merge pull request #607 from Hanaasagi/fix-warning
clippy: clean useless `any` in cfg
2 parents 1fa1c14 + 0e4aec4 commit d4bfd72

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

aya/src/maps/perf/async_perf_event_array.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ pub struct AsyncPerfEventArrayBuffer<T> {
137137
async_fd: Async<RawFd>,
138138
}
139139

140-
#[cfg(any(feature = "async_tokio"))]
140+
#[cfg(feature = "async_tokio")]
141141
impl<T: BorrowMut<MapData> + Borrow<MapData>> AsyncPerfEventArrayBuffer<T> {
142142
/// Reads events from the buffer.
143143
///

aya/src/maps/perf/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
//! Ring buffer types used to receive events from eBPF programs using the linux `perf` API.
22
//!
33
//! See the [`PerfEventArray`](crate::maps::PerfEventArray) and [`AsyncPerfEventArray`](crate::maps::perf::AsyncPerfEventArray).
4-
#[cfg(any(feature = "async"))]
4+
#[cfg(feature = "async")]
55
#[cfg_attr(docsrs, doc(cfg(feature = "async")))]
66
mod async_perf_event_array;
77
mod perf_buffer;
88
mod perf_event_array;
99

10-
#[cfg(any(feature = "async"))]
10+
#[cfg(feature = "async")]
1111
#[cfg_attr(docsrs, doc(cfg(feature = "async")))]
1212
pub use async_perf_event_array::*;
1313
pub use perf_buffer::*;

bpf/aya-bpf-cty/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ pub use od::*;
1515
// PWD = Pointer Width Dependent
1616
pub use pwd::*;
1717

18-
#[cfg(any(target_arch = "bpf"))]
18+
#[cfg(target_arch = "bpf")]
1919
mod ad {
2020
pub type c_int = i32;
2121
pub type c_uint = u32;

0 commit comments

Comments
 (0)