Skip to content

Commit

Permalink
pd: 📎 address obfuscated_if_else lint
Browse files Browse the repository at this point in the history
i disagree, but i yield to clippy
  • Loading branch information
cratelyn authored and conorsch committed Jan 26, 2024
1 parent e7bcdba commit 3ba08d1
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions crates/bin/pd/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
};
Expand Down

0 comments on commit 3ba08d1

Please sign in to comment.