chore: Fix unused_qualifications lints

This was failing the docs build.

Signed-off-by: Dave Tucker <dave@dtucker.co.uk>
pull/899/head
Dave Tucker 7 months ago
parent 84ed505275
commit 481b73b6d8

@ -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() };

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

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

@ -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)]

Loading…
Cancel
Save