1
0
mirror of https://github.com/actix/actix-website synced 2025-01-22 16:15:56 +01:00

update routing example

This commit is contained in:
Nikolay Kim 2018-05-30 16:09:30 -07:00
parent 3116e2e4e9
commit c28b2fc492

View File

@ -130,8 +130,8 @@ fn register(data: Form<Register>) -> impl Responder {
"Hello from the index page" "Hello from the index page"
} }
fn hello(req: HttpRequest) -> impl Responder { fn hello(path: Path<String>) -> impl Responder {
format!("Hello {}!", req.match_info().get("name").unwrap()) format!("Hello {}!", *path)
} }
fn main() { fn main() {