Skip to content

Commit df88257

Browse files
committed
clippy
1 parent eb7f10e commit df88257

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

src/default_client.rs

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -325,19 +325,19 @@ where
325325
) -> Result<Response<Incoming>, hyper::Error> {
326326
match self {
327327
SendRequest::Http1(sender) => {
328-
if req.version() == hyper::Version::HTTP_2 {
329-
if let Some(authority) = req.uri().authority().cloned() {
330-
match authority.as_str().parse::<header::HeaderValue>() {
331-
Ok(host_value) => {
332-
req.headers_mut().insert(header::HOST, host_value);
333-
}
334-
Err(err) => {
335-
tracing::warn!(
336-
"Failed to parse authority '{}' as HOST header: {}",
337-
authority,
338-
err
339-
);
340-
}
328+
if req.version() == hyper::Version::HTTP_2
329+
&& let Some(authority) = req.uri().authority().cloned()
330+
{
331+
match authority.as_str().parse::<header::HeaderValue>() {
332+
Ok(host_value) => {
333+
req.headers_mut().insert(header::HOST, host_value);
334+
}
335+
Err(err) => {
336+
tracing::warn!(
337+
"Failed to parse authority '{}' as HOST header: {}",
338+
authority,
339+
err
340+
);
341341
}
342342
}
343343
}

0 commit comments

Comments
 (0)