nicer indentation
This commit is contained in:
parent
252c69d5b2
commit
591fd66786
48
src/main.rs
48
src/main.rs
|
@ -9,35 +9,33 @@ use rocket::form::{Form, FromForm};
|
||||||
use rocket::http::{ContentType, Header};
|
use rocket::http::{ContentType, Header};
|
||||||
use rocket::response::status::NoContent;
|
use rocket::response::status::NoContent;
|
||||||
use rocket::response::{Debug, Redirect, Responder};
|
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 serde::Deserialize;
|
||||||
use std::str::FromStr;
|
use std::str::FromStr;
|
||||||
|
|
||||||
#[rocket::launch]
|
#[rocket::launch]
|
||||||
fn rocket() -> Rocket<Build> {
|
fn rocket() -> _ {
|
||||||
rocket::build()
|
let client = Client::builder()
|
||||||
.manage(
|
.user_agent(format!(
|
||||||
Client::builder()
|
"emojos.in/{} (+https://github.com/iliana/emojos.in)",
|
||||||
.user_agent(format!(
|
env!("CARGO_PKG_VERSION")
|
||||||
"emojos.in/{} (+https://github.com/iliana/emojos.in)",
|
))
|
||||||
env!("CARGO_PKG_VERSION")
|
.build()
|
||||||
))
|
.unwrap();
|
||||||
.build()
|
|
||||||
.unwrap(),
|
rocket::build().manage(client).mount(
|
||||||
)
|
"/",
|
||||||
.mount(
|
routes![
|
||||||
"/",
|
code,
|
||||||
routes![
|
copy_js,
|
||||||
code,
|
css,
|
||||||
copy_js,
|
favicon_ico,
|
||||||
css,
|
index,
|
||||||
favicon_ico,
|
instance,
|
||||||
index,
|
instance_form,
|
||||||
instance,
|
robots_txt
|
||||||
instance_form,
|
],
|
||||||
robots_txt
|
)
|
||||||
],
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#[get("/")]
|
#[get("/")]
|
||||||
|
|
Loading…
Reference in New Issue