1
0
mirror of https://github.com/fafhrd91/actix-web synced 2025-08-31 17:07:01 +02:00

make Task private

This commit is contained in:
Nikolay Kim
2017-11-30 15:13:56 -08:00
parent 271a292ea5
commit 07cc017320
7 changed files with 61 additions and 83 deletions

View File

@@ -3,7 +3,7 @@
use http::StatusCode;
use body::Body;
use task::Task;
use route::Reply;
use route::RouteHandler;
use httprequest::HttpRequest;
use httpresponse::{HttpResponse, HttpResponseBuilder};
@@ -69,8 +69,8 @@ impl StaticResponse {
}
impl<S> RouteHandler<S> for StaticResponse {
fn handle(&self, _: HttpRequest<S>, task: &mut Task) {
task.reply(HttpResponse::new(self.0, Body::Empty))
fn handle(&self, _: HttpRequest<S>) -> Reply {
Reply::response(HttpResponse::new(self.0, Body::Empty))
}
}