aboutsummaryrefslogtreecommitdiffstats
path: root/src/wireguard/workers.rs
diff options
context:
space:
mode:
authorQuang Luong <quangio@outlook.com>2020-09-18 11:20:06 +0700
committerMathias Hall-Andersen <mathias@hall-andersen.dk>2020-10-08 10:19:51 +0200
commit9b53a9d1a61115a328ca43955153d09cc2e969ef (patch)
treeb84d83a431dfdc5777e61d40c60c7b0de088f8fd /src/wireguard/workers.rs
parentAdded MIT license (diff)
downloadwireguard-rs-9b53a9d1a61115a328ca43955153d09cc2e969ef.tar.xz
wireguard-rs-9b53a9d1a61115a328ca43955153d09cc2e969ef.zip
Fix some clippy warnings
Signed-off-by: Quang Luong <quangio@outlook.com>
Diffstat (limited to '')
-rw-r--r--src/wireguard/workers.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/wireguard/workers.rs b/src/wireguard/workers.rs
index b4673cd..27acf2f 100644
--- a/src/wireguard/workers.rs
+++ b/src/wireguard/workers.rs
@@ -231,7 +231,7 @@ pub fn handshake_worker<T: Tun, B: UDP>(
}
// add any new keypair to peer
- keypair.map(|kp| {
+ if let Some(kp) = keypair {
debug!("{} : handshake worker, new keypair for {}", wg, peer);
// this means that a handshake response was processed or sent
@@ -241,7 +241,7 @@ pub fn handshake_worker<T: Tun, B: UDP>(
for id in peer.add_keypair(kp) {
device.release(id);
}
- });
+ };
}
}
Err(e) => debug!("{} : handshake worker, error = {:?}", wg, e),