style: Format code with fmt

This commit is contained in:
Simon C
2024-08-08 15:01:28 +02:00
parent b10fc30984
commit 0eaf238735
8 changed files with 28 additions and 18 deletions

View File

@ -11,10 +11,10 @@ struct HelloResponse {
async fn hello() -> impl IntoResponse {
HelloResponse {
name: "Theo".to_string(),
}.into_response()
}
.into_response()
}
pub fn get_routes() -> Router {
Router::new()
.route("/", routing::get(hello))
Router::new().route("/", routing::get(hello))
}

View File

@ -25,7 +25,9 @@ impl MenuResponse {
fn get_classes(&self, is_current_item: &bool) -> String {
let common_classes = match self.mobile {
true => "block border-l-4 py-2 pl-3 pr-4 text-base font-medium".to_string(),
false => "inline-flex items-center border-b-2 px-1 pt-1 text-sm font-medium".to_string(),
false => {
"inline-flex items-center border-b-2 px-1 pt-1 text-sm font-medium".to_string()
}
};
match (self.mobile, is_current_item) {
(true, true) => common_classes + " border-indigo-500 bg-indigo-50 text-indigo-700",
@ -50,11 +52,11 @@ async fn menu(Query(params): Query<MenuParameters>) -> impl IntoResponse {
href: "/pages/cps".to_string(),
current: false,
},
],
}.into_response()
],
}
.into_response()
}
pub fn get_routes() -> Router {
Router::new()
.route("/menu", routing::get(menu))
Router::new().route("/menu", routing::get(menu))
}

View File

@ -56,10 +56,10 @@ async fn menu(Query(params): Query<MenuParameters>) -> impl IntoResponse {
current: false,
},
],
}.into_response()
}
.into_response()
}
pub fn get_routes() -> Router {
Router::new()
.route("/menu", routing::get(menu))
}
Router::new().route("/menu", routing::get(menu))
}