From 3ba08d1d671a948690b4ddfb5a91ad8f62b9dfcb Mon Sep 17 00:00:00 2001 From: katelyn martin Date: Thu, 25 Jan 2024 16:54:06 -0500 Subject: [PATCH] =?UTF-8?q?pd:=20=F0=9F=93=8E=20address=20obfuscated=5Fif?= =?UTF-8?q?=5Felse=20lint?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit i disagree, but i yield to clippy --- crates/bin/pd/src/main.rs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/crates/bin/pd/src/main.rs b/crates/bin/pd/src/main.rs index d6a2e4e05c..e823c1b419 100644 --- a/crates/bin/pd/src/main.rs +++ b/crates/bin/pd/src/main.rs @@ -89,10 +89,11 @@ async fn main() -> anyhow::Result<()> { const HTTPS_DEFAULT: SocketAddr = SocketAddr::new(IpAddr::V4(Ipv4Addr::new(0, 0, 0, 0)), 443); let default = || { - grpc_auto_https - .is_some() - .then_some(HTTPS_DEFAULT) - .unwrap_or(HTTP_DEFAULT) + if grpc_auto_https.is_some() { + HTTPS_DEFAULT + } else { + HTTP_DEFAULT + } }; grpc_bind.unwrap_or_else(default) };