From 4257643354263d69ed02b1e9385675560927da79 Mon Sep 17 00:00:00 2001 From: Tamir Duberstein Date: Fri, 27 Dec 2024 10:00:02 -0500 Subject: [PATCH] Clean up C type imports --- aya/src/bpf.rs | 6 ++---- aya/src/maps/mod.rs | 4 ++-- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/aya/src/bpf.rs b/aya/src/bpf.rs index b812f6f2..e0025f49 100644 --- a/aya/src/bpf.rs +++ b/aya/src/bpf.rs @@ -1,11 +1,9 @@ use std::{ borrow::Cow, collections::{HashMap, HashSet}, + ffi::c_int, fs, io, - os::{ - fd::{AsFd as _, AsRawFd as _}, - raw::c_int, - }, + os::fd::{AsFd as _, AsRawFd as _}, path::{Path, PathBuf}, sync::{Arc, LazyLock}, }; diff --git a/aya/src/maps/mod.rs b/aya/src/maps/mod.rs index f5115522..418c43c4 100644 --- a/aya/src/maps/mod.rs +++ b/aya/src/maps/mod.rs @@ -1012,10 +1012,10 @@ mod test_utils { #[cfg(test)] mod tests { - use std::os::fd::AsRawFd as _; + use std::{ffi::c_char, os::fd::AsRawFd as _}; use assert_matches::assert_matches; - use libc::{c_char, EFAULT}; + use libc::EFAULT; fn new_obj_map() -> obj::Map { test_utils::new_obj_map::(crate::generated::bpf_map_type::BPF_MAP_TYPE_HASH)