Skip to content

Commit

Permalink
Merge pull request #885 from dave-tucker/nightly-up
Browse files Browse the repository at this point in the history
chore: Appease clippy unused imports
  • Loading branch information
dave-tucker committed Feb 22, 2024
2 parents 963dd13 + 770a95e commit 2d72197
Show file tree
Hide file tree
Showing 8 changed files with 7 additions and 18 deletions.
2 changes: 0 additions & 2 deletions aya-obj/src/obj.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1394,10 +1394,8 @@ mod tests {
use alloc::vec;

use assert_matches::assert_matches;
use object::Endianness;

use super::*;
use crate::maps::PinningType;

const FAKE_INS_LEN: u64 = 8;

Expand Down
5 changes: 1 addition & 4 deletions aya-obj/src/relocation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -498,10 +498,7 @@ mod test {
use alloc::{string::ToString, vec, vec::Vec};

use super::*;
use crate::{
maps::{BtfMap, LegacyMap, Map},
BpfSectionKind,
};
use crate::maps::{BtfMap, LegacyMap};

fn fake_sym(index: usize, section_index: usize, address: u64, name: &str, size: u64) -> Symbol {
Symbol {
Expand Down
2 changes: 1 addition & 1 deletion aya-tool/src/bindgen.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use bindgen::{self, Builder, EnumVariation};
use bindgen::{Builder, EnumVariation};

pub fn user_builder() -> Builder {
bindgen::builder()
Expand Down
2 changes: 1 addition & 1 deletion aya/src/maps/bloom_filter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ mod tests {
bpf_cmd,
bpf_map_type::{BPF_MAP_TYPE_BLOOM_FILTER, BPF_MAP_TYPE_PERF_EVENT_ARRAY},
},
maps::{Map, MapData},
maps::Map,
obj::{self, maps::LegacyMap, BpfSectionKind},
sys::{override_syscall, SysResult, Syscall},
};
Expand Down
2 changes: 1 addition & 1 deletion aya/src/maps/lpm_trie.rs
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ mod tests {
bpf_cmd,
bpf_map_type::{BPF_MAP_TYPE_LPM_TRIE, BPF_MAP_TYPE_PERF_EVENT_ARRAY},
},
maps::{Map, MapData},
maps::Map,
obj::{self, maps::LegacyMap, BpfSectionKind},
sys::{override_syscall, SysResult, Syscall},
};
Expand Down
3 changes: 1 addition & 2 deletions aya/src/maps/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1031,8 +1031,7 @@ mod tests {
use crate::{
bpf_map_def,
generated::{bpf_cmd, bpf_map_type::BPF_MAP_TYPE_HASH},
maps::MapData,
obj::{maps::LegacyMap, BpfSectionKind},
obj::maps::LegacyMap,
sys::{override_syscall, Syscall},
};

Expand Down
7 changes: 2 additions & 5 deletions aya/src/maps/perf/perf_buffer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -284,15 +284,12 @@ impl Drop for PerfBuffer {

#[cfg(test)]
mod tests {
use std::{fmt::Debug, mem};
use std::fmt::Debug;

use assert_matches::assert_matches;

use super::*;
use crate::{
generated::perf_event_mmap_page,
sys::{override_syscall, Syscall, TEST_MMAP_RET},
};
use crate::sys::{override_syscall, Syscall, TEST_MMAP_RET};

#[repr(C)]
#[derive(Debug)]
Expand Down
2 changes: 0 additions & 2 deletions aya/src/programs/xdp.rs
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
//! eXpress Data Path (XDP) programs.

use std::{
convert::TryFrom,
ffi::CString,
hash::Hash,
io,
os::fd::{AsFd as _, AsRawFd as _, BorrowedFd, RawFd},
path::Path,
};

use bitflags;
use libc::if_nametoindex;
use thiserror::Error;

Expand Down

0 comments on commit 2d72197

Please sign in to comment.