refactor: remove unused code and fields
Co-authored-by: aider (openai/andrew/openrouter/qwen/qwen3-coder) <aider@aider.chat>
This commit is contained in:
21
src/args.rs
21
src/args.rs
@@ -163,24 +163,3 @@ impl FromStr for NumberOrString {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Struct for key-value pairs.
|
|
||||||
*/
|
|
||||||
#[derive(Debug, Clone)]
|
|
||||||
pub struct KeyValue {
|
|
||||||
pub key: String,
|
|
||||||
pub value: String,
|
|
||||||
}
|
|
||||||
|
|
||||||
impl FromStr for KeyValue {
|
|
||||||
type Err = Error;
|
|
||||||
fn from_str(s: &str) -> Result<Self, Self::Err> {
|
|
||||||
match s.split_once('=') {
|
|
||||||
Some(kv) => Ok(KeyValue {
|
|
||||||
key: kv.0.to_string(),
|
|
||||||
value: kv.1.to_string(),
|
|
||||||
}),
|
|
||||||
None => Err(anyhow!("Unable to parse key=value pair")),
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -106,9 +106,6 @@ pub fn get_format_box_chars_no_border_line_separator() -> TableFormat {
|
|||||||
.build()
|
.build()
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn get_digest_type_meta(digest_type: MetaPluginType) -> String {
|
|
||||||
format!("digest_{}", digest_type.to_string().to_lowercase())
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -28,8 +28,6 @@ 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 password_hash: Option<String>,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Serialize, Deserialize, ToSchema)]
|
#[derive(Serialize, Deserialize, ToSchema)]
|
||||||
|
|||||||
@@ -17,9 +17,6 @@ pub enum CoreError {
|
|||||||
#[error("Invalid input: {0}")]
|
#[error("Invalid input: {0}")]
|
||||||
InvalidInput(String),
|
InvalidInput(String),
|
||||||
|
|
||||||
#[error("Configuration error: {0}")]
|
|
||||||
Config(String),
|
|
||||||
|
|
||||||
#[error("Compression error: {0}")]
|
#[error("Compression error: {0}")]
|
||||||
Compression(String),
|
Compression(String),
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user