From 591fd6678642e8b8364c80c69b6f77450dc7ff28 Mon Sep 17 00:00:00 2001 From: iliana etaoin Date: Thu, 6 Apr 2023 13:34:17 -0700 Subject: [PATCH] nicer indentation --- src/main.rs | 48 +++++++++++++++++++++++------------------------- 1 file changed, 23 insertions(+), 25 deletions(-) diff --git a/src/main.rs b/src/main.rs index b0caa7c..e0056c9 100644 --- a/src/main.rs +++ b/src/main.rs @@ -9,35 +9,33 @@ use rocket::form::{Form, FromForm}; use rocket::http::{ContentType, Header}; use rocket::response::status::NoContent; use rocket::response::{Debug, Redirect, Responder}; -use rocket::{get, post, routes, uri, Build, Rocket, State}; +use rocket::{get, post, routes, uri, State}; use serde::Deserialize; use std::str::FromStr; #[rocket::launch] -fn rocket() -> Rocket { - rocket::build() - .manage( - Client::builder() - .user_agent(format!( - "emojos.in/{} (+https://github.com/iliana/emojos.in)", - env!("CARGO_PKG_VERSION") - )) - .build() - .unwrap(), - ) - .mount( - "/", - routes![ - code, - copy_js, - css, - favicon_ico, - index, - instance, - instance_form, - robots_txt - ], - ) +fn rocket() -> _ { + let client = Client::builder() + .user_agent(format!( + "emojos.in/{} (+https://github.com/iliana/emojos.in)", + env!("CARGO_PKG_VERSION") + )) + .build() + .unwrap(); + + rocket::build().manage(client).mount( + "/", + routes![ + code, + copy_js, + css, + favicon_ico, + index, + instance, + instance_form, + robots_txt + ], + ) } #[get("/")]