Browse Source

chore: Fix unused_qualifications lints

This was failing the docs build.

Signed-off-by: Dave Tucker <[email protected]>
Dave Tucker 1 year ago
parent
commit
481b73b6d8
4 changed files with 4 additions and 4 deletions
  1. 1 1
      aya/src/maps/mod.rs
  2. 1 1
      aya/src/maps/ring_buf.rs
  3. 1 1
      aya/src/programs/mod.rs
  4. 1 1
      aya/src/util.rs

+ 1 - 1
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::<rlimit>::uninit();
+    let mut limit = mem::MaybeUninit::<rlimit>::uninit();
     let ret = unsafe { getrlimit(RLIMIT_MEMLOCK, limit.as_mut_ptr()) };
     if ret == 0 {
         let limit = unsafe { limit.assume_init() };

+ 1 - 1
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 {

+ 1 - 1
aya/src/programs/mod.rs

@@ -611,7 +611,7 @@ fn load_program<T: Link>(
     }
     let obj = obj.as_ref().unwrap();
     let (
-        crate::obj::Program {
+        obj::Program {
             license,
             kernel_version,
             ..

+ 1 - 1
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)]