refactor: improve code quality and fix linting issues
- Derive Default trait instead of manual implementation for McpRoot and ProviderManager - Remove redundant closures in codex_config.rs and config.rs - Simplify match statements to if let patterns in migration.rs and lib.rs - Remove unnecessary type conversions and borrows in lib.rs - Fix i18n key inconsistency: sequentialThinking → sequential-thinking - Format TypeScript files to match Prettier style All clippy warnings resolved, code passes all quality checks.
This commit is contained in:
@@ -45,21 +45,12 @@ impl Provider {
|
||||
}
|
||||
|
||||
/// 供应商管理器
|
||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||
#[derive(Debug, Clone, Serialize, Deserialize, Default)]
|
||||
pub struct ProviderManager {
|
||||
pub providers: HashMap<String, Provider>,
|
||||
pub current: String,
|
||||
}
|
||||
|
||||
impl Default for ProviderManager {
|
||||
fn default() -> Self {
|
||||
Self {
|
||||
providers: HashMap::new(),
|
||||
current: String::new(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// 供应商元数据
|
||||
#[derive(Debug, Clone, Serialize, Deserialize, Default)]
|
||||
pub struct ProviderMeta {
|
||||
|
||||
Reference in New Issue
Block a user