From 01cbe34ac3d66d4fa4a65d82e14cc34bbb4fcff3 Mon Sep 17 00:00:00 2001 From: asonix Date: Sat, 30 Sep 2023 17:34:05 -0500 Subject: [PATCH] Remove unneeded annotation --- src/middleware/deadline.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/middleware/deadline.rs b/src/middleware/deadline.rs index c6ddb43..db7cb41 100644 --- a/src/middleware/deadline.rs +++ b/src/middleware/deadline.rs @@ -96,7 +96,7 @@ where } fn call(&self, req: ServiceRequest) -> Self::Future { - let duration: Result, ParseDeadlineError> = req + let duration = req .headers() .get("X-Request-Deadline") .map(|deadline| { @@ -122,6 +122,7 @@ where } }) .transpose(); + DeadlineFuture::new(self.inner.call(req), duration) } }