From 88329a79e2c7bb7f2b88e9fdd0b2c81ed6541315 Mon Sep 17 00:00:00 2001 From: asonix Date: Mon, 21 Nov 2022 14:25:24 -0600 Subject: [PATCH] clippy --- src/config.rs | 2 +- src/routes/index.rs | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/config.rs b/src/config.rs index 884a30f..04a1427 100644 --- a/src/config.rs +++ b/src/config.rs @@ -171,7 +171,7 @@ impl Config { let local_domains = config .local_domains .iter() - .flat_map(|s| s.split(",")) + .flat_map(|s| s.split(',')) .map(|d| d.to_string()) .collect(); diff --git a/src/routes/index.rs b/src/routes/index.rs index f243d8b..048eb05 100644 --- a/src/routes/index.rs +++ b/src/routes/index.rs @@ -33,8 +33,7 @@ pub(crate) async fn route( config .local_domains() .iter() - .find(|domain| domain.as_str() == authority) - .is_some() + .any(|domain| domain.as_str() == authority) }) .unwrap_or(false) {