From f44f7265e09d2192d4bab4f22688e4e0c820c6a2 Mon Sep 17 00:00:00 2001 From: Rajin Gill Date: Tue, 14 Dec 2021 00:23:58 -0800 Subject: [PATCH] style(http1): correct indentation Minor reformatting of single block. --- src/proto/h1/role.rs | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/src/proto/h1/role.rs b/src/proto/h1/role.rs index 1f6c2e36..3e074eb8 100644 --- a/src/proto/h1/role.rs +++ b/src/proto/h1/role.rs @@ -76,21 +76,22 @@ where #[cfg(all(feature = "server", feature = "runtime"))] if !*ctx.h1_header_read_timeout_running { - if let Some(h1_header_read_timeout) = ctx.h1_header_read_timeout { - let deadline = Instant::now() + h1_header_read_timeout; + if let Some(h1_header_read_timeout) = ctx.h1_header_read_timeout { + let deadline = Instant::now() + h1_header_read_timeout; - match ctx.h1_header_read_timeout_fut { - Some(h1_header_read_timeout_fut) => { - debug!("resetting h1 header read timeout timer"); - h1_header_read_timeout_fut.as_mut().reset(deadline); - }, - None => { - debug!("setting h1 header read timeout timer"); - *ctx.h1_header_read_timeout_fut = Some(Box::pin(tokio::time::sleep_until(deadline))); + match ctx.h1_header_read_timeout_fut { + Some(h1_header_read_timeout_fut) => { + debug!("resetting h1 header read timeout timer"); + h1_header_read_timeout_fut.as_mut().reset(deadline); + } + None => { + debug!("setting h1 header read timeout timer"); + *ctx.h1_header_read_timeout_fut = + Some(Box::pin(tokio::time::sleep_until(deadline))); + } } } } -} T::parse(bytes, ctx) }