From 7e90aec5d9d0dfe32d397d39d6b8ff2efcc3d15c Mon Sep 17 00:00:00 2001 From: Valentin Brandl Date: Fri, 2 Aug 2019 23:54:35 +0200 Subject: [PATCH] Remove unnecessary boxing --- backend/src/service.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/backend/src/service.rs b/backend/src/service.rs index cf42c1d..a35ed79 100644 --- a/backend/src/service.rs +++ b/backend/src/service.rs @@ -81,7 +81,7 @@ pub(crate) trait Service { where S: 'static + Stream, { - Box::new(match response.status() { + match response.status() { StatusCode::OK => Box::new( response .json::() @@ -103,7 +103,7 @@ pub(crate) trait Service { ) as Box>, code => Box::new(futures::future::ok(HttpResponse::build(code).finish())) as Box>, - }) + } } } @@ -213,7 +213,7 @@ impl Service for GitLab { where S: 'static + Stream, { - Box::new(match response.status() { + match response.status() { StatusCode::OK => Box::new( response .json::() @@ -258,6 +258,6 @@ impl Service for GitLab { ) as Box>, code => Box::new(futures::future::ok(HttpResponse::build(code).finish())) as Box>, - }) + } } }