From 1bba242098222b3eaf1e3b9a4328970016f9d64b Mon Sep 17 00:00:00 2001 From: SajjadPourali Date: Sat, 6 Apr 2024 18:26:00 -0400 Subject: [PATCH] Fix the clippy issue --- examples/tun2.rs | 2 +- examples/tun_wintun.rs | 2 +- src/packet.rs | 2 +- src/stream/unknown.rs | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/examples/tun2.rs b/examples/tun2.rs index b3d9296..1df739f 100644 --- a/examples/tun2.rs +++ b/examples/tun2.rs @@ -135,7 +135,7 @@ async fn main() -> Result<(), Box> { resp.update_checksum(req_payload); let mut payload = resp.to_bytes().to_vec(); payload.extend_from_slice(req_payload); - u.send(payload).await?; + u.send(payload)?; } else { println!("ICMPv4"); } diff --git a/examples/tun_wintun.rs b/examples/tun_wintun.rs index b6e9211..9c6c9d0 100644 --- a/examples/tun_wintun.rs +++ b/examples/tun_wintun.rs @@ -96,7 +96,7 @@ async fn main() -> Result<(), Box> { resp.update_checksum(req_payload); let mut payload = resp.to_bytes().to_vec(); payload.extend_from_slice(req_payload); - u.send(payload).await?; + u.send(payload)?; } else { println!("ICMPv4"); } diff --git a/src/packet.rs b/src/packet.rs index 2a564c0..24117b7 100644 --- a/src/packet.rs +++ b/src/packet.rs @@ -287,7 +287,7 @@ pub mod tests { let mut c = Criterion::default() .with_output_color(true) .without_plots() - .with_filter(&filter) + .with_filter(filter) .warm_up_time(Duration::from_secs_f32(0.5)) .measurement_time(Duration::from_secs_f32(0.5)) .profile_time(profile_time.map(|s| Duration::from_secs_f32(s.parse().unwrap()))); diff --git a/src/stream/unknown.rs b/src/stream/unknown.rs index cf76b5e..2346865 100644 --- a/src/stream/unknown.rs +++ b/src/stream/unknown.rs @@ -51,7 +51,7 @@ impl IpStackUnknownTransport { pub fn ip_protocol(&self) -> IpNumber { self.protocol } - pub async fn send(&self, mut payload: Vec) -> Result<(), Error> { + pub fn send(&self, mut payload: Vec) -> Result<(), Error> { loop { let packet = self.create_rev_packet(&mut payload)?; self.packet_sender