From 812e0f8b1c3bce708e2f643b67730a70ebaf4070 Mon Sep 17 00:00:00 2001 From: Ibraheem Ahmed Date: Tue, 22 Jun 2021 18:36:35 -0400 Subject: [PATCH] remove use of unstable `bool_to_option` --- src/info.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/info.rs b/src/info.rs index 63f8eea0a..fae7b1b69 100644 --- a/src/info.rs +++ b/src/info.rs @@ -96,7 +96,7 @@ impl ConnectionInfo { let scheme = scheme .or_else(|| first_header_value(X_FORWARDED_PROTO)) .or_else(|| req.uri.scheme().map(Scheme::as_str)) - .or_else(|| cfg.secure().then(|| "https")) + .or_else(|| Some("https").filter(|_| cfg.secure())) .unwrap_or("http") .to_owned();