From 9e0f078090f3288a2ee028445479e750d934d8b6 Mon Sep 17 00:00:00 2001 From: lemunozm Date: Wed, 13 Sep 2023 16:11:06 +0200 Subject: [PATCH] fix clippy --- src/network.rs | 2 +- src/network/poll.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/network.rs b/src/network.rs index 1b5eafd..c95d239 100644 --- a/src/network.rs +++ b/src/network.rs @@ -389,7 +389,7 @@ impl NetworkProcessor { ) { loop { let now = Instant::now(); - self.process_poll_event(Some(timeout), |e| event_callback(e)); + self.process_poll_event(Some(timeout), &mut event_callback); if now.elapsed() > timeout { break } diff --git a/src/network/poll.rs b/src/network/poll.rs index 6119af2..83578f6 100644 --- a/src/network/poll.rs +++ b/src/network/poll.rs @@ -83,7 +83,7 @@ impl Poll { break } Err(ref err) if err.kind() == ErrorKind::Interrupted => continue, - Err(ref err) => Err(err).expect("No error here"), + Err(ref err) => panic!("{}: No error here", err), } } }