diff --git a/aya/src/maps/mod.rs b/aya/src/maps/mod.rs index 42b06696..b0548889 100644 --- a/aya/src/maps/mod.rs +++ b/aya/src/maps/mod.rs @@ -222,7 +222,7 @@ impl AsFd for MapFd { /// Raises a warning about rlimit. Should be used only if creating a map was not /// successful. fn maybe_warn_rlimit() { - let mut limit = std::mem::MaybeUninit::::uninit(); + let mut limit = mem::MaybeUninit::::uninit(); let ret = unsafe { getrlimit(RLIMIT_MEMLOCK, limit.as_mut_ptr()) }; if ret == 0 { let limit = unsafe { limit.assume_init() }; diff --git a/aya/src/maps/ring_buf.rs b/aya/src/maps/ring_buf.rs index 434606d5..9344780b 100644 --- a/aya/src/maps/ring_buf.rs +++ b/aya/src/maps/ring_buf.rs @@ -431,7 +431,7 @@ impl MMap { io_error: io::Error::last_os_error(), })), ptr => Ok(Self { - ptr: ptr::NonNull::new(ptr).ok_or( + ptr: NonNull::new(ptr).ok_or( // This should never happen, but to be paranoid, and so we never need to talk // about a null pointer, we check it anyway. MapError::SyscallError(SyscallError { diff --git a/aya/src/programs/mod.rs b/aya/src/programs/mod.rs index f06174ff..92eb2069 100644 --- a/aya/src/programs/mod.rs +++ b/aya/src/programs/mod.rs @@ -611,7 +611,7 @@ fn load_program( } let obj = obj.as_ref().unwrap(); let ( - crate::obj::Program { + obj::Program { license, kernel_version, .. diff --git a/aya/src/util.rs b/aya/src/util.rs index 4e91d081..3ce8aef4 100644 --- a/aya/src/util.rs +++ b/aya/src/util.rs @@ -370,7 +370,7 @@ pub(crate) fn bytes_of_bpf_name(bpf_name: &[core::ffi::c_char; 16]) -> &[u8] { .rposition(|ch| *ch != 0) .map(|pos| pos + 1) .unwrap_or(0); - unsafe { std::slice::from_raw_parts(bpf_name.as_ptr() as *const _, length) } + unsafe { slice::from_raw_parts(bpf_name.as_ptr() as *const _, length) } } #[cfg(test)]