diff options
author | Melody Horn / boringcactus <melody@boringcactus.com> | 2021-06-12 21:06:06 -0600 |
---|---|---|
committer | Melody Horn / boringcactus <melody@boringcactus.com> | 2021-06-12 21:06:06 -0600 |
commit | 582124d59afa438e2cb88cc024d6b19232236e1e (patch) | |
tree | 6b1bc48d5e3a405434f4900c7e20daf0d186de5a /examples/tutorial01/polls | |
parent | fcc13328ff82326d25e39504732701b27f894e22 (diff) | |
download | tosin-582124d59afa438e2cb88cc024d6b19232236e1e.tar.gz tosin-582124d59afa438e2cb88cc024d6b19232236e1e.zip |
stub out basic implementation
Diffstat (limited to 'examples/tutorial01/polls')
-rw-r--r-- | examples/tutorial01/polls/urls.rs | 2 | ||||
-rw-r--r-- | examples/tutorial01/polls/views.rs | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/examples/tutorial01/polls/urls.rs b/examples/tutorial01/polls/urls.rs index e978920..d56b8c9 100644 --- a/examples/tutorial01/polls/urls.rs +++ b/examples/tutorial01/polls/urls.rs @@ -2,6 +2,6 @@ use tosin::urls::Path; use super::views; -pub const url_patterns: &[Path] = [ +pub const URL_PATTERNS: &[Path] = &[ Path::View { url: "", view: views::index, name: "index" }, ]; diff --git a/examples/tutorial01/polls/views.rs b/examples/tutorial01/polls/views.rs index 8678e97..23b740d 100644 --- a/examples/tutorial01/polls/views.rs +++ b/examples/tutorial01/polls/views.rs @@ -1,5 +1,5 @@ use tosin::http::{Request, Response}; -pub async fn index(request: Request) -> Response { +pub fn index(request: Request) -> Response { Response("Hello, world. You're at the polls index.") } |