chore: remove unused imports and variables
Co-authored-by: aider (openai/andrew/openrouter/deepseek/deepseek-chat-v3.1) <aider@aider.chat>
This commit is contained in:
@@ -21,7 +21,6 @@ mod pages;
|
|||||||
mod mcp;
|
mod mcp;
|
||||||
|
|
||||||
pub use common::{AppState, logging_middleware, create_auth_middleware};
|
pub use common::{AppState, logging_middleware, create_auth_middleware};
|
||||||
pub use mcp::KeepMcpServer;
|
|
||||||
|
|
||||||
pub fn mode_server(
|
pub fn mode_server(
|
||||||
_cmd: &mut Command,
|
_cmd: &mut Command,
|
||||||
|
|||||||
@@ -108,12 +108,6 @@ pub struct ItemContentInfo {
|
|||||||
#[derive(Debug, Deserialize)]
|
#[derive(Debug, Deserialize)]
|
||||||
pub struct TagsQuery {
|
pub struct TagsQuery {
|
||||||
pub tags: Option<String>,
|
pub tags: Option<String>,
|
||||||
#[serde(default = "default_allow_binary")]
|
|
||||||
pub allow_binary: bool,
|
|
||||||
}
|
|
||||||
|
|
||||||
fn default_allow_binary() -> bool {
|
|
||||||
true
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug, Deserialize)]
|
#[derive(Debug, Deserialize)]
|
||||||
@@ -208,11 +202,6 @@ pub async fn logging_middleware(
|
|||||||
) -> Response {
|
) -> Response {
|
||||||
let method = request.method().clone();
|
let method = request.method().clone();
|
||||||
let uri = request.uri().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::<u64>().ok())
|
|
||||||
.unwrap_or(0);
|
|
||||||
|
|
||||||
let start = Instant::now();
|
let start = Instant::now();
|
||||||
let response = next.run(request).await;
|
let response = next.run(request).await;
|
||||||
|
|||||||
@@ -4,11 +4,8 @@ use crate::services::types::{ItemWithContent, ItemWithMeta};
|
|||||||
use rusqlite::Connection;
|
use rusqlite::Connection;
|
||||||
use std::collections::HashMap;
|
use std::collections::HashMap;
|
||||||
use std::path::PathBuf;
|
use std::path::PathBuf;
|
||||||
use std::str::FromStr;
|
|
||||||
use std::sync::Arc;
|
use std::sync::Arc;
|
||||||
use tokio::sync::Mutex;
|
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.
|
/// 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
|
/// It uses `tokio::task::spawn_blocking` to run synchronous database and filesystem operations
|
||||||
|
|||||||
Reference in New Issue
Block a user