From 0932ea96147081b0f6e1c183eb14a2b44d3c25c9 Mon Sep 17 00:00:00 2001 From: Andrew Phillips Date: Mon, 25 Aug 2025 20:42:31 -0300 Subject: [PATCH] chore: remove unused imports and variables Co-authored-by: aider (openai/andrew/openrouter/deepseek/deepseek-chat-v3.1) --- src/modes/server.rs | 1 - src/modes/server/common.rs | 11 ----------- src/services/async_item_service.rs | 3 --- 3 files changed, 15 deletions(-) diff --git a/src/modes/server.rs b/src/modes/server.rs index e4d2432..1e1a47a 100644 --- a/src/modes/server.rs +++ b/src/modes/server.rs @@ -21,7 +21,6 @@ mod pages; mod mcp; pub use common::{AppState, logging_middleware, create_auth_middleware}; -pub use mcp::KeepMcpServer; pub fn mode_server( _cmd: &mut Command, diff --git a/src/modes/server/common.rs b/src/modes/server/common.rs index 17f60c4..518c0c4 100644 --- a/src/modes/server/common.rs +++ b/src/modes/server/common.rs @@ -108,12 +108,6 @@ pub struct ItemContentInfo { #[derive(Debug, Deserialize)] pub struct TagsQuery { pub tags: Option, - #[serde(default = "default_allow_binary")] - pub allow_binary: bool, -} - -fn default_allow_binary() -> bool { - true } #[derive(Debug, Deserialize)] @@ -208,11 +202,6 @@ pub async fn logging_middleware( ) -> Response { let method = request.method().clone(); let uri = request.uri().clone(); - let request_content_length = request.headers() - .get("content-length") - .and_then(|v| v.to_str().ok()) - .and_then(|s| s.parse::().ok()) - .unwrap_or(0); let start = Instant::now(); let response = next.run(request).await; diff --git a/src/services/async_item_service.rs b/src/services/async_item_service.rs index e7dd30f..55a5300 100644 --- a/src/services/async_item_service.rs +++ b/src/services/async_item_service.rs @@ -4,11 +4,8 @@ use crate::services::types::{ItemWithContent, ItemWithMeta}; use rusqlite::Connection; use std::collections::HashMap; use std::path::PathBuf; -use std::str::FromStr; use std::sync::Arc; use tokio::sync::Mutex; -use tokio::io::AsyncReadExt; -use tokio_util::io::ReaderStream; /// An asynchronous wrapper around the `ItemService` for use in async contexts like the web server. /// It uses `tokio::task::spawn_blocking` to run synchronous database and filesystem operations