Remove unnecassary mutables
This commit is contained in:
parent
131ffd7a23
commit
4a2f16d6ff
@ -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 {})?)
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user