Remove unnecessary boxing
This commit is contained in:
parent
ced6c7dc46
commit
7e90aec5d9
@ -81,7 +81,7 @@ pub(crate) trait Service {
|
|||||||
where
|
where
|
||||||
S: 'static + Stream<Item = Bytes, Error = PayloadError>,
|
S: 'static + Stream<Item = Bytes, Error = PayloadError>,
|
||||||
{
|
{
|
||||||
Box::new(match response.status() {
|
match response.status() {
|
||||||
StatusCode::OK => Box::new(
|
StatusCode::OK => Box::new(
|
||||||
response
|
response
|
||||||
.json::<Self::Response>()
|
.json::<Self::Response>()
|
||||||
@ -103,7 +103,7 @@ pub(crate) trait Service {
|
|||||||
) as Box<dyn Future<Item = HttpResponse, Error = Error>>,
|
) as Box<dyn Future<Item = HttpResponse, Error = Error>>,
|
||||||
code => Box::new(futures::future::ok(HttpResponse::build(code).finish()))
|
code => Box::new(futures::future::ok(HttpResponse::build(code).finish()))
|
||||||
as Box<dyn Future<Item = HttpResponse, Error = Error>>,
|
as Box<dyn Future<Item = HttpResponse, Error = Error>>,
|
||||||
})
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -213,7 +213,7 @@ impl Service for GitLab {
|
|||||||
where
|
where
|
||||||
S: 'static + Stream<Item = Bytes, Error = PayloadError>,
|
S: 'static + Stream<Item = Bytes, Error = PayloadError>,
|
||||||
{
|
{
|
||||||
Box::new(match response.status() {
|
match response.status() {
|
||||||
StatusCode::OK => Box::new(
|
StatusCode::OK => Box::new(
|
||||||
response
|
response
|
||||||
.json::<GitLabProject>()
|
.json::<GitLabProject>()
|
||||||
@ -258,6 +258,6 @@ impl Service for GitLab {
|
|||||||
) as Box<dyn Future<Item = HttpResponse, Error = Error>>,
|
) as Box<dyn Future<Item = HttpResponse, Error = Error>>,
|
||||||
code => Box::new(futures::future::ok(HttpResponse::build(code).finish()))
|
code => Box::new(futures::future::ok(HttpResponse::build(code).finish()))
|
||||||
as Box<dyn Future<Item = HttpResponse, Error = Error>>,
|
as Box<dyn Future<Item = HttpResponse, Error = Error>>,
|
||||||
})
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user