From a95fa1b03ed2a6b8d9302791dac4693f5aa84f78 Mon Sep 17 00:00:00 2001 From: Jake McGinty Date: Sun, 9 Jan 2022 23:12:28 -0600 Subject: [PATCH] wireguard-control: make cargo clippy happy --- wireguard-control/src/backends/kernel.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wireguard-control/src/backends/kernel.rs b/wireguard-control/src/backends/kernel.rs index bdcfa3b..711c0da 100644 --- a/wireguard-control/src/backends/kernel.rs +++ b/wireguard-control/src/backends/kernel.rs @@ -263,7 +263,7 @@ impl ApplyPayload { fn flush_nlas(&mut self) { // // cleanup: clear out any empty peer lists. self.nlas - .retain(|nla| !matches!(nla, WgDeviceAttrs::Peers(peers) if peers.len() == 0)); + .retain(|nla| !matches!(nla, WgDeviceAttrs::Peers(peers) if peers.is_empty())); let name = WgDeviceAttrs::IfName(self.iface.clone()); self.current_buffer_len = name.buffer_len();