From c28b2fc492cd879dff57c31bda5f10b26265e6ef Mon Sep 17 00:00:00 2001 From: Nikolay Kim Date: Wed, 30 May 2018 16:09:30 -0700 Subject: [PATCH] update routing example --- layouts/index.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/layouts/index.html b/layouts/index.html index 37fc768..c383f20 100644 --- a/layouts/index.html +++ b/layouts/index.html @@ -130,8 +130,8 @@ fn register(data: Form) -> impl Responder { "Hello from the index page" } -fn hello(req: HttpRequest) -> impl Responder { - format!("Hello {}!", req.match_info().get("name").unwrap()) +fn hello(path: Path) -> impl Responder { + format!("Hello {}!", *path) } fn main() {