diff options
author | Melody Horn / boringcactus <melody@boringcactus.com> | 2021-06-13 13:39:02 -0600 |
---|---|---|
committer | Melody Horn / boringcactus <melody@boringcactus.com> | 2021-06-13 13:39:02 -0600 |
commit | cc7d316e588c21de1023d6a76d4ea5e7b893977a (patch) | |
tree | 47586de87551cf41756fc9f1f02a30b439251a60 /examples/tutorial01/polls | |
parent | 6a2f8ab0b2c7028636ddf06a7dd776f5f8b3ace6 (diff) | |
download | tosin-cc7d316e588c21de1023d6a76d4ea5e7b893977a.tar.gz tosin-cc7d316e588c21de1023d6a76d4ea5e7b893977a.zip |
macro based url map definition
Diffstat (limited to 'examples/tutorial01/polls')
-rw-r--r-- | examples/tutorial01/polls/urls.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/examples/tutorial01/polls/urls.rs b/examples/tutorial01/polls/urls.rs index 184c6f8..04d93cc 100644 --- a/examples/tutorial01/polls/urls.rs +++ b/examples/tutorial01/polls/urls.rs @@ -1,9 +1,9 @@ -use tosin::http::Filter; -use tosin::urls::{UrlMap, path}; +use tosin::urls::{UrlMap, url_map}; use super::views; pub fn urls() -> UrlMap { - path::end().map(views::index) // TODO name: "index" - .boxed() + url_map! { + => views::index, // TODO name: "index" + } } |