fix: remove unused imports and make unused fields private
Co-authored-by: aider (openai/andrew/openrouter/qwen/qwen3-coder) <aider@aider.chat>
This commit is contained in:
@@ -1,5 +1,4 @@
|
|||||||
use std::path::PathBuf;
|
use std::path::PathBuf;
|
||||||
use std::str::FromStr;
|
|
||||||
|
|
||||||
use clap::*;
|
use clap::*;
|
||||||
use anyhow::{Error, anyhow};
|
use anyhow::{Error, anyhow};
|
||||||
@@ -174,8 +173,8 @@ impl FromStr for NumberOrString {
|
|||||||
*/
|
*/
|
||||||
#[derive(Debug, Clone)]
|
#[derive(Debug, Clone)]
|
||||||
pub struct KeyValue {
|
pub struct KeyValue {
|
||||||
pub key: String,
|
pub(crate) key: String,
|
||||||
pub value: String,
|
pub(crate) value: String,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl FromStr for KeyValue {
|
impl FromStr for KeyValue {
|
||||||
|
|||||||
@@ -3,7 +3,6 @@ use axum::{
|
|||||||
http::StatusCode,
|
http::StatusCode,
|
||||||
response::Json,
|
response::Json,
|
||||||
};
|
};
|
||||||
use std::str::FromStr;
|
|
||||||
|
|
||||||
use crate::modes::server::common::{AppState, ApiResponse, StatusInfoResponse};
|
use crate::modes::server::common::{AppState, ApiResponse, StatusInfoResponse};
|
||||||
use crate::common::status::{generate_status_info, StatusInfo};
|
use crate::common::status::{generate_status_info, StatusInfo};
|
||||||
|
|||||||
@@ -11,7 +11,6 @@ use serde::{Deserialize, Serialize};
|
|||||||
use std::collections::HashMap;
|
use std::collections::HashMap;
|
||||||
use std::net::SocketAddr;
|
use std::net::SocketAddr;
|
||||||
use std::path::PathBuf;
|
use std::path::PathBuf;
|
||||||
use std::str::FromStr;
|
|
||||||
use std::sync::Arc;
|
use std::sync::Arc;
|
||||||
use std::time::Instant;
|
use std::time::Instant;
|
||||||
use tokio::sync::Mutex;
|
use tokio::sync::Mutex;
|
||||||
@@ -29,8 +28,8 @@ pub struct ServerConfig {
|
|||||||
pub struct AppState {
|
pub struct AppState {
|
||||||
pub db: Arc<Mutex<rusqlite::Connection>>,
|
pub db: Arc<Mutex<rusqlite::Connection>>,
|
||||||
pub data_dir: PathBuf,
|
pub data_dir: PathBuf,
|
||||||
pub password: Option<String>,
|
pub(crate) password: Option<String>,
|
||||||
pub password_hash: Option<String>,
|
pub(crate) password_hash: Option<String>,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Serialize, Deserialize, ToSchema)]
|
#[derive(Serialize, Deserialize, ToSchema)]
|
||||||
|
|||||||
Reference in New Issue
Block a user