1
0
mirror of https://github.com/actix/actix-extras.git synced 2025-06-25 09:59:21 +02:00

move state to request object

This commit is contained in:
Nikolay Kim
2017-11-26 21:18:38 -08:00
parent 8e0a7f44d4
commit 5a3b6638a7
12 changed files with 81 additions and 71 deletions

View File

@ -16,7 +16,7 @@ fn create_server<T, A>() -> HttpServer<T, A, Application<()>> {
HttpServer::new(
vec![Application::default("/")
.resource("/", |r|
r.handler(Method::GET, |_, _| {
r.handler(Method::GET, |_| {
Ok(httpcodes::HTTPOk)
}))
.finish()])
@ -96,7 +96,7 @@ fn test_middlewares() {
response: act_num2,
finish: act_num3})
.resource("/", |r|
r.handler(Method::GET, |_, _| {
r.handler(Method::GET, |_| {
Ok(httpcodes::HTTPOk)
}))
.finish()])