Skip to content

Commit

Permalink
Fix the clippy issue
Browse files Browse the repository at this point in the history
  • Loading branch information
SajjadPourali committed Apr 6, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
1 parent fd54d0b commit 1bba242
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion examples/tun2.rs
Original file line number Diff line number Diff line change
@@ -135,7 +135,7 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
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");
}
2 changes: 1 addition & 1 deletion examples/tun_wintun.rs
Original file line number Diff line number Diff line change
@@ -96,7 +96,7 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
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");
}
2 changes: 1 addition & 1 deletion src/packet.rs
Original file line number Diff line number Diff line change
@@ -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())));
2 changes: 1 addition & 1 deletion src/stream/unknown.rs
Original file line number Diff line number Diff line change
@@ -51,7 +51,7 @@ impl IpStackUnknownTransport {
pub fn ip_protocol(&self) -> IpNumber {
self.protocol
}
pub async fn send(&self, mut payload: Vec<u8>) -> Result<(), Error> {
pub fn send(&self, mut payload: Vec<u8>) -> Result<(), Error> {
loop {
let packet = self.create_rev_packet(&mut payload)?;
self.packet_sender

0 comments on commit 1bba242

Please sign in to comment.