remove use of unstable `bool_to_option`

This commit is contained in:
Ibraheem Ahmed 2021-06-22 18:36:35 -04:00 committed by GitHub
parent 24912a6d26
commit 812e0f8b1c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -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();