fix: remove unused imports and dead code

Co-authored-by: aider (openai/andrew/openrouter/qwen/qwen3-coder) <aider@aider.chat>
This commit is contained in:
Andrew Phillips
2025-08-12 15:34:57 -03:00
parent 46fff9464f
commit 13f7e7e095
4 changed files with 2 additions and 8 deletions

View File

@@ -12,8 +12,6 @@ use tower_http::cors::CorsLayer;
use tower::ServiceBuilder;
use tower_http::trace::TraceLayer;
use crate::Args;
mod common;
mod api;
mod docs;
@@ -37,14 +35,13 @@ pub fn mode_server(
let rt = tokio::runtime::Runtime::new()?;
// Take ownership of the connection and move it into the async runtime
let owned_conn = std::mem::replace(conn, rusqlite::Connection::open_in_memory()?);
rt.block_on(run_server(config, owned_conn, data_path, args))
rt.block_on(run_server(config, owned_conn, data_path))
}
async fn run_server(
config: ServerConfig,
conn: rusqlite::Connection,
data_dir: PathBuf,
args: &Args,
) -> Result<()> {
debug!("Starting REST HTTP server on {}", config.address);
@@ -55,7 +52,6 @@ async fn run_server(
db: db_conn,
data_dir: data_dir.clone(),
password: config.password.clone(),
args: Arc::new(args.clone()),
};
let app = Router::new()

View File

@@ -5,7 +5,6 @@ use axum::{
http::header,
};
use log::warn;
use serde_json::json;
use std::collections::HashMap;
use std::net::SocketAddr;
use std::path::PathBuf;

View File

@@ -2,7 +2,7 @@ pub mod item;
pub mod status;
use axum::{
routing::{get, post, delete},
routing::get,
Router,
};

View File

@@ -33,7 +33,6 @@ pub struct AppState {
pub db: Arc<Mutex<rusqlite::Connection>>,
pub data_dir: PathBuf,
pub password: Option<String>,
pub args: Arc<Args>,
}
#[derive(Serialize, Deserialize)]