From 07fccb6b2ab8ab52f41b4adb587b0a4bd10ae3c3 Mon Sep 17 00:00:00 2001 From: Jacob Kiers Date: Thu, 5 Oct 2023 00:26:19 +0200 Subject: [PATCH] Clippy Signed-off-by: Jacob Kiers --- src/servers/protocol/tls.rs | 2 +- src/servers/upstream_address.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/servers/protocol/tls.rs b/src/servers/protocol/tls.rs index 1227c15..73ace78 100644 --- a/src/servers/protocol/tls.rs +++ b/src/servers/protocol/tls.rs @@ -99,6 +99,6 @@ mod tests { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, ]; let sni = get_sni(&BUF); - assert!(sni[0] == "www.lirui.tech".to_string()); + assert!(sni[0] == *"www.lirui.tech"); } } diff --git a/src/servers/upstream_address.rs b/src/servers/upstream_address.rs index 5b07e04..0e24124 100644 --- a/src/servers/upstream_address.rs +++ b/src/servers/upstream_address.rs @@ -37,7 +37,7 @@ impl UpstreamAddress { } fn is_resolved(&self) -> bool { - self.resolved_addresses.len() > 0 + !self.resolved_addresses.is_empty() } fn time_remaining(&self) -> Duration {