fix clippy

This commit is contained in:
Pierre Dubouilh authored and Martin Algesten committed 2022-04-08 09:53:55 +02:00
1 parent aced0d9b6a
commit 0a71385b29
1 file changed
+2 -3
+2 -3
View File
@@ -349,9 +349,8 @@ fn connect_socket(unit: &Unit, hostname: &str, use_pooled: bool) -> Result<(Stre
scheme => return Err(ErrorKind::UnknownScheme.msg(format!("unknown scheme '{}'", scheme))), scheme => return Err(ErrorKind::UnknownScheme.msg(format!("unknown scheme '{}'", scheme))),
}; };
if unit.url.scheme() != "https" && unit.agent.config.https_only { if unit.url.scheme() != "https" && unit.agent.config.https_only {
return Err(ErrorKind::InsecureRequestHttpsOnly.msg(format!( return Err(ErrorKind::InsecureRequestHttpsOnly
"can't perform non https request with https_only set" .msg("can't perform non https request with https_only set"));
)));
} }
if use_pooled { if use_pooled {
let pool = &unit.agent.state.pool; let pool = &unit.agent.state.pool;