Skip to content

Commit f44f726

Browse files
rajingseanmonstar
authored andcommitted
style(http1): correct indentation
Minor reformatting of single block.
1 parent e8cccce commit f44f726

File tree

1 file changed

+12
-11
lines changed

1 file changed

+12
-11
lines changed

src/proto/h1/role.rs

+12-11
Original file line numberDiff line numberDiff line change
@@ -76,21 +76,22 @@ where
7676

7777
#[cfg(all(feature = "server", feature = "runtime"))]
7878
if !*ctx.h1_header_read_timeout_running {
79-
if let Some(h1_header_read_timeout) = ctx.h1_header_read_timeout {
80-
let deadline = Instant::now() + h1_header_read_timeout;
79+
if let Some(h1_header_read_timeout) = ctx.h1_header_read_timeout {
80+
let deadline = Instant::now() + h1_header_read_timeout;
8181

82-
match ctx.h1_header_read_timeout_fut {
83-
Some(h1_header_read_timeout_fut) => {
84-
debug!("resetting h1 header read timeout timer");
85-
h1_header_read_timeout_fut.as_mut().reset(deadline);
86-
},
87-
None => {
88-
debug!("setting h1 header read timeout timer");
89-
*ctx.h1_header_read_timeout_fut = Some(Box::pin(tokio::time::sleep_until(deadline)));
82+
match ctx.h1_header_read_timeout_fut {
83+
Some(h1_header_read_timeout_fut) => {
84+
debug!("resetting h1 header read timeout timer");
85+
h1_header_read_timeout_fut.as_mut().reset(deadline);
86+
}
87+
None => {
88+
debug!("setting h1 header read timeout timer");
89+
*ctx.h1_header_read_timeout_fut =
90+
Some(Box::pin(tokio::time::sleep_until(deadline)));
91+
}
9092
}
9193
}
9294
}
93-
}
9495

9596
T::parse(bytes, ctx)
9697
}

0 commit comments

Comments
 (0)