Remove unnecassary mutables

This commit is contained in:
clerie 2025-02-01 20:18:32 +01:00
parent 131ffd7a23
commit 4a2f16d6ff

View File

@ -84,11 +84,11 @@ async fn main() -> anyhow::Result<()> {
.await
.context("Failed to connect to database")?;
let mut state = AppState {
let state = AppState {
storage,
};
let mut app = Router::new()
let app = Router::new()
.route("/", get(route_index))
.route("/flakes", get(route_flakes))
.route("/f/{uri}", get(route_flake_info))
@ -106,9 +106,7 @@ async fn main() -> anyhow::Result<()> {
Ok(())
}
async fn route_index(
State(state): State<AppState>,
) -> Result<impl IntoResponse, AppError> {
async fn route_index() -> Result<impl IntoResponse, AppError> {
Ok(render_template(&IndexTemplate {})?)
}