mirror of
https://github.com/actix/actix-extras.git
synced 2025-06-25 09:59:21 +02:00
renamed Route::handler to Route::f, added Route::h to register Handler
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.route().method(Method::GET).handler(|_| httpcodes::HTTPOk))
|
||||
r.route().method(Method::GET).h(httpcodes::HTTPOk))
|
||||
.finish()])
|
||||
}
|
||||
|
||||
@ -94,7 +94,7 @@ fn test_middlewares() {
|
||||
response: act_num2,
|
||||
finish: act_num3})
|
||||
.resource("/", |r|
|
||||
r.route().method(Method::GET).handler(|_| httpcodes::HTTPOk))
|
||||
r.route().method(Method::GET).h(httpcodes::HTTPOk))
|
||||
.finish()])
|
||||
.serve::<_, ()>("127.0.0.1:58904").unwrap();
|
||||
sys.run();
|
||||
|
Reference in New Issue
Block a user