diff options
author | Quang Luong <quangio@outlook.com> | 2020-09-18 11:20:06 +0700 |
---|---|---|
committer | Mathias Hall-Andersen <mathias@hall-andersen.dk> | 2020-10-08 10:19:51 +0200 |
commit | 9b53a9d1a61115a328ca43955153d09cc2e969ef (patch) | |
tree | b84d83a431dfdc5777e61d40c60c7b0de088f8fd /src/wireguard/workers.rs | |
parent | Added MIT license (diff) | |
download | wireguard-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.rs | 4 |
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), |