refactor: 移除未使用的代码和注释掉的辅助函数
This commit is contained in:
@@ -373,26 +373,26 @@ impl CommitCommand {
|
||||
}
|
||||
}
|
||||
|
||||
// Helper trait for optional builder methods
|
||||
trait CommitBuilderExt {
|
||||
fn scope_opt(self, scope: Option<String>) -> Self;
|
||||
fn body_opt(self, body: Option<String>) -> Self;
|
||||
}
|
||||
// // Helper trait for optional builder methods
|
||||
// trait CommitBuilderExt {
|
||||
// fn scope_opt(self, scope: Option<String>) -> Self;
|
||||
// fn body_opt(self, body: Option<String>) -> Self;
|
||||
// }
|
||||
|
||||
impl CommitBuilderExt for CommitBuilder {
|
||||
fn scope_opt(self, scope: Option<String>) -> Self {
|
||||
if let Some(s) = scope {
|
||||
self.scope(s)
|
||||
} else {
|
||||
self
|
||||
}
|
||||
}
|
||||
// impl CommitBuilderExt for CommitBuilder {
|
||||
// fn scope_opt(self, scope: Option<String>) -> Self {
|
||||
// if let Some(s) = scope {
|
||||
// self.scope(s)
|
||||
// } else {
|
||||
// self
|
||||
// }
|
||||
// }
|
||||
|
||||
fn body_opt(self, body: Option<String>) -> Self {
|
||||
if let Some(b) = body {
|
||||
self.body(b)
|
||||
} else {
|
||||
self
|
||||
}
|
||||
}
|
||||
}
|
||||
// fn body_opt(self, body: Option<String>) -> Self {
|
||||
// if let Some(b) = body {
|
||||
// self.body(b)
|
||||
// } else {
|
||||
// self
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
||||
@@ -750,7 +750,7 @@ impl ConfigCommand {
|
||||
let manager = self.get_manager(config_path)?;
|
||||
let toml = manager.export()?;
|
||||
|
||||
let export_content = if let Some(path) = output {
|
||||
let export_content = if let Some(_path) = output {
|
||||
let pwd = if let Some(p) = password {
|
||||
p.to_string()
|
||||
} else {
|
||||
|
||||
@@ -240,7 +240,7 @@ impl InitCommand {
|
||||
.or_else(|_| std::env::var(format!("QUICOMMIT_{}_API_KEY", provider.to_uppercase())))
|
||||
.ok();
|
||||
|
||||
if let Some(key) = env_key {
|
||||
if let Some(_key) = env_key {
|
||||
println!("\n{} {}", "✓".green(), "Found API key in environment variable.".green());
|
||||
None
|
||||
} else if keyring_available {
|
||||
|
||||
Reference in New Issue
Block a user