Cargo fmt

This commit is contained in:
Candifloss 2026-04-22 16:06:28 +05:30
parent 2f597030b5
commit e6737d3b4e
3 changed files with 29 additions and 38 deletions

View File

@ -1,4 +1,4 @@
use axum::{routing::get, Router};
use axum::{Router, routing::get};
use clap::Parser;
use std::sync::Arc;
use tokio::net::TcpListener;
@ -20,17 +20,11 @@ async fn main() {
let db = Arc::new(Db::open(&args.db).expect("db open failed"));
let app = Router::new()
.route("/", get(routes::index))
.with_state(db);
let app = Router::new().route("/", get(routes::index)).with_state(db);
let listener = TcpListener::bind("127.0.0.1:8040")
.await
.unwrap();
let listener = TcpListener::bind("127.0.0.1:8040").await.unwrap();
println!("http://127.0.0.1:8040");
axum::serve(listener, app)
.await
.unwrap();
axum::serve(listener, app).await.unwrap();
}

View File

@ -1,9 +1,6 @@
use askama::Template; // REQUIRED
use axum::{
extract::State,
response::Html,
};
use axum::{extract::State, response::Html};
use std::sync::Arc;
use crate::db::Db;