1
0
Fork 0

Reorder code

This commit is contained in:
Alex Kotov 2020-10-14 05:26:03 +05:00
parent c9b96a236a
commit 2224ec9d6c
Signed by: kotovalexarian
GPG key ID: 553C0EBBEB5D5F08

View file

@ -12,6 +12,13 @@ struct TemplateContext {
users: Vec<&'static str>,
}
fn main() {
rocket::ignite()
.attach(Template::fairing())
.mount("/", routes![index])
.launch();
}
#[get("/")]
fn index() -> Template {
let template_context = TemplateContext {
@ -21,10 +28,3 @@ fn index() -> Template {
Template::render("index", &template_context)
}
fn main() {
rocket::ignite()
.attach(Template::fairing())
.mount("/", routes![index])
.launch();
}