making the formatter happy

reviewable/pr1218/r3
Ryan Alameddine 1 month ago
parent cd2451ccd0
commit e8036808b9

@ -10,7 +10,7 @@ use aya_ebpf_bindings::helpers::{
};
use aya_ebpf_cty::c_long;
use crate::{bindings::__sk_buff, check_bounds_signed, EbpfContext};
use crate::{EbpfContext, bindings::__sk_buff, check_bounds_signed};
pub struct SkBuff {
pub skb: *mut __sk_buff,

@ -3,7 +3,6 @@
use aya_ebpf::{macros::socket_filter, programs::SkBuffContext};
#[socket_filter]
pub fn read_one(ctx: SkBuffContext) -> i64 {
// Read 1 byte

@ -10,8 +10,8 @@ mod rbpf;
mod relocations;
mod ring_buf;
mod smoke;
mod socket_filter;
mod strncmp;
mod tcx;
mod uprobe_cookie;
mod xdp;
mod socket_filter;

@ -1,13 +1,8 @@
use aya::{programs::SocketFilter, Ebpf};
use aya::{Ebpf, programs::SocketFilter};
#[test]
fn socket_filter_load() {
let mut bpf = Ebpf::load(crate::SOCKET_FILTER).unwrap();
let prog: &mut SocketFilter = bpf
.program_mut("read_one")
.unwrap()
.try_into()
.unwrap();
let prog: &mut SocketFilter = bpf.program_mut("read_one").unwrap().try_into().unwrap();
prog.load().unwrap();
}
Loading…
Cancel
Save