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

remove Applicaiton::route, resource is enough

This commit is contained in:
Nikolay Kim
2017-12-06 08:03:08 -08:00
parent 04ded5ba68
commit 87c7441f7d
11 changed files with 53 additions and 58 deletions

View File

@@ -114,7 +114,7 @@ fn index(req: HttpRequest) -> FutureResult<HttpResponse, Error> {
fn main() {
Application::default("/")
.route("/async", |r| r.a(index))
.resource("/async", |r| r.route().a(index))
.finish();
}
```
@@ -139,7 +139,7 @@ fn index(req: HttpRequest) -> HttpResponse {
fn main() {
Application::default("/")
.route("/async", |r| r.f(index))
.resource("/async", |r| r.f(index))
.finish();
}
```