use Result intead of HandlerResult

This commit is contained in:
Nikolay Kim 2017-11-18 06:50:07 -10:00
parent c800bf55f5
commit a87784ba15
4 changed files with 6 additions and 9 deletions

View file

@ -5,6 +5,7 @@ extern crate env_logger;
extern crate futures;
use actix_web::*;
use actix_web::error::Result;
use futures::stream::{once, Once};
/// somple handle
@ -32,8 +33,7 @@ fn index_async(req: &mut HttpRequest, _payload: Payload, state: &())
}
/// handle with path parameters like `/user/{name}/`
fn with_param(req: &mut HttpRequest, _payload: Payload, state: &())
-> HandlerResult<HttpResponse>
fn with_param(req: &mut HttpRequest, _payload: Payload, state: &()) -> Result<HttpResponse>
{
println!("{:?}", req);