ksud: fmt

This commit is contained in:
Ylarod
2025-11-22 17:29:40 +08:00
committed by ShirkNeko
parent 923ba8c213
commit b2565fda08

View File

@@ -579,7 +579,12 @@ pub fn run() -> Result<()> {
None => anyhow::bail!("Key '{key}' not found"), None => anyhow::bail!("Key '{key}' not found"),
} }
} }
ModuleConfigCmd::Set { key, value, stdin, temp } => { ModuleConfigCmd::Set {
key,
value,
stdin,
temp,
} => {
// Validate key at CLI layer for better user experience // Validate key at CLI layer for better user experience
module_config::validate_config_key(&key)?; module_config::validate_config_key(&key)?;
@@ -590,7 +595,8 @@ pub fn run() -> Result<()> {
// Read from stdin // Read from stdin
use std::io::Read; use std::io::Read;
let mut buffer = String::new(); let mut buffer = String::new();
std::io::stdin().read_to_string(&mut buffer) std::io::stdin()
.read_to_string(&mut buffer)
.context("Failed to read from stdin")?; .context("Failed to read from stdin")?;
buffer buffer
} }
@@ -604,7 +610,12 @@ pub fn run() -> Result<()> {
} else { } else {
module_config::ConfigType::Persist module_config::ConfigType::Persist
}; };
module_config::set_config_value(&module_id, &key, &value_str, config_type) module_config::set_config_value(
&module_id,
&key,
&value_str,
config_type,
)
} }
ModuleConfigCmd::List => { ModuleConfigCmd::List => {
let config = module_config::merge_configs(&module_id)?; let config = module_config::merge_configs(&module_id)?;