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:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user