chore: Appease clippy unused imports

Signed-off-by: Dave Tucker <dave@dtucker.co.uk>
pull/885/head
Dave Tucker 9 months ago
parent 963dd13219
commit 770a95e077

@ -1394,10 +1394,8 @@ mod tests {
use alloc::vec; use alloc::vec;
use assert_matches::assert_matches; use assert_matches::assert_matches;
use object::Endianness;
use super::*; use super::*;
use crate::maps::PinningType;
const FAKE_INS_LEN: u64 = 8; const FAKE_INS_LEN: u64 = 8;

@ -498,10 +498,7 @@ mod test {
use alloc::{string::ToString, vec, vec::Vec}; use alloc::{string::ToString, vec, vec::Vec};
use super::*; use super::*;
use crate::{ use crate::maps::{BtfMap, LegacyMap};
maps::{BtfMap, LegacyMap, Map},
BpfSectionKind,
};
fn fake_sym(index: usize, section_index: usize, address: u64, name: &str, size: u64) -> Symbol { fn fake_sym(index: usize, section_index: usize, address: u64, name: &str, size: u64) -> Symbol {
Symbol { Symbol {

@ -1,4 +1,4 @@
use bindgen::{self, Builder, EnumVariation}; use bindgen::{Builder, EnumVariation};
pub fn user_builder() -> Builder { pub fn user_builder() -> Builder {
bindgen::builder() bindgen::builder()

@ -91,7 +91,7 @@ mod tests {
bpf_cmd, bpf_cmd,
bpf_map_type::{BPF_MAP_TYPE_BLOOM_FILTER, BPF_MAP_TYPE_PERF_EVENT_ARRAY}, bpf_map_type::{BPF_MAP_TYPE_BLOOM_FILTER, BPF_MAP_TYPE_PERF_EVENT_ARRAY},
}, },
maps::{Map, MapData}, maps::Map,
obj::{self, maps::LegacyMap, BpfSectionKind}, obj::{self, maps::LegacyMap, BpfSectionKind},
sys::{override_syscall, SysResult, Syscall}, sys::{override_syscall, SysResult, Syscall},
}; };

@ -208,7 +208,7 @@ mod tests {
bpf_cmd, bpf_cmd,
bpf_map_type::{BPF_MAP_TYPE_LPM_TRIE, BPF_MAP_TYPE_PERF_EVENT_ARRAY}, bpf_map_type::{BPF_MAP_TYPE_LPM_TRIE, BPF_MAP_TYPE_PERF_EVENT_ARRAY},
}, },
maps::{Map, MapData}, maps::Map,
obj::{self, maps::LegacyMap, BpfSectionKind}, obj::{self, maps::LegacyMap, BpfSectionKind},
sys::{override_syscall, SysResult, Syscall}, sys::{override_syscall, SysResult, Syscall},
}; };

@ -1031,8 +1031,7 @@ mod tests {
use crate::{ use crate::{
bpf_map_def, bpf_map_def,
generated::{bpf_cmd, bpf_map_type::BPF_MAP_TYPE_HASH}, generated::{bpf_cmd, bpf_map_type::BPF_MAP_TYPE_HASH},
maps::MapData, obj::maps::LegacyMap,
obj::{maps::LegacyMap, BpfSectionKind},
sys::{override_syscall, Syscall}, sys::{override_syscall, Syscall},
}; };

@ -284,15 +284,12 @@ impl Drop for PerfBuffer {
#[cfg(test)] #[cfg(test)]
mod tests { mod tests {
use std::{fmt::Debug, mem}; use std::fmt::Debug;
use assert_matches::assert_matches; use assert_matches::assert_matches;
use super::*; use super::*;
use crate::{ use crate::sys::{override_syscall, Syscall, TEST_MMAP_RET};
generated::perf_event_mmap_page,
sys::{override_syscall, Syscall, TEST_MMAP_RET},
};
#[repr(C)] #[repr(C)]
#[derive(Debug)] #[derive(Debug)]

@ -1,7 +1,6 @@
//! eXpress Data Path (XDP) programs. //! eXpress Data Path (XDP) programs.
use std::{ use std::{
convert::TryFrom,
ffi::CString, ffi::CString,
hash::Hash, hash::Hash,
io, io,
@ -9,7 +8,6 @@ use std::{
path::Path, path::Path,
}; };
use bitflags;
use libc::if_nametoindex; use libc::if_nametoindex;
use thiserror::Error; use thiserror::Error;

Loading…
Cancel
Save