Browse Source

Format fixes

Alessandro Decina 4 years ago
parent
commit
a3ab2eff57
4 changed files with 12 additions and 8 deletions
  1. 4 2
      aya/src/maps/perf_map/perf_map.rs
  2. 1 2
      aya/src/obj/btf/btf.rs
  3. 6 1
      aya/src/programs/mod.rs
  4. 1 3
      aya/src/programs/xdp.rs

+ 4 - 2
aya/src/maps/perf_map/perf_map.rs

@@ -12,8 +12,10 @@ use thiserror::Error;
 
 use crate::{
     generated::bpf_map_type::BPF_MAP_TYPE_PERF_EVENT_ARRAY,
-    maps::perf_map::{Events, PerfBuffer, PerfBufferError},
-    maps::{Map, MapError, MapRefMut},
+    maps::{
+        perf_map::{Events, PerfBuffer, PerfBufferError},
+        Map, MapError, MapRefMut,
+    },
     sys::bpf_map_update_elem,
 };
 

+ 1 - 2
aya/src/obj/btf/btf.rs

@@ -12,8 +12,7 @@ use thiserror::Error;
 
 use crate::{
     generated::{btf_ext_header, btf_header},
-    obj::btf::relocation::Relocation,
-    obj::btf::BtfType,
+    obj::btf::{relocation::Relocation, BtfType},
 };
 
 pub(crate) const MAX_RESOLVE_DEPTH: u8 = 32;

+ 6 - 1
aya/src/programs/mod.rs

@@ -6,7 +6,12 @@ pub mod xdp;
 
 use libc::{close, ENOSPC};
 use std::{
-    cell::RefCell, cmp, convert::TryFrom, ffi::CStr, io, os::raw::c_uint, os::unix::io::RawFd,
+    cell::RefCell,
+    cmp,
+    convert::TryFrom,
+    ffi::CStr,
+    io,
+    os::{raw::c_uint, unix::io::RawFd},
     rc::Rc,
 };
 use thiserror::Error;

+ 1 - 3
aya/src/programs/xdp.rs

@@ -9,9 +9,7 @@ use crate::{
         XDP_FLAGS_HW_MODE, XDP_FLAGS_REPLACE, XDP_FLAGS_SKB_MODE, XDP_FLAGS_UPDATE_IF_NOEXIST,
     },
     programs::{load_program, FdLink, Link, LinkRef, ProgramData, ProgramError},
-    sys::bpf_link_create,
-    sys::kernel_version,
-    sys::netlink_set_xdp_fd,
+    sys::{bpf_link_create, kernel_version, netlink_set_xdp_fd},
 };
 
 #[derive(Debug, Error)]