mirror of
https://github.com/fafhrd91/actix-web
synced 2025-06-25 06:39:22 +02:00
move state to request object
This commit is contained in:
@ -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()])
|
||||
|
Reference in New Issue
Block a user