From 2224ec9d6c128cca4f49364bcf4fc0eda25f55cf Mon Sep 17 00:00:00 2001 From: Alex Kotov Date: Wed, 14 Oct 2020 05:26:03 +0500 Subject: [PATCH] Reorder code --- src/main.rs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/main.rs b/src/main.rs index a43f1ac..3cc278b 100644 --- a/src/main.rs +++ b/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(); -}