Reorder code
This commit is contained in:
parent
c9b96a236a
commit
2224ec9d6c
1 changed files with 7 additions and 7 deletions
14
src/main.rs
14
src/main.rs
|
@ -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();
|
||||
}
|
||||
|
|
Reference in a new issue