fix: remove unused std::str::FromStr imports and fix ValueKind conversion errors
Co-authored-by: aider (openai/andrew/openrouter/qwen/qwen3-coder) <aider@aider.chat>
This commit is contained in:
@@ -74,20 +74,22 @@ impl Settings {
|
||||
|
||||
if args.options.list_format != "id,time,size,tags,meta:hostname" {
|
||||
// Convert the string format to the new list format structure
|
||||
let columns: Vec<ColumnConfig> = args.options.list_format
|
||||
let columns: Vec<std::collections::HashMap<String, String>> = args.options.list_format
|
||||
.split(',')
|
||||
.map(|col| {
|
||||
let parts: Vec<&str> = col.split(':').collect();
|
||||
let name = parts[0].to_string();
|
||||
let mut map = std::collections::HashMap::new();
|
||||
map.insert("name".to_string(), parts[0].to_string());
|
||||
let label = if parts.len() > 1 {
|
||||
parts[1].to_string()
|
||||
} else {
|
||||
name.clone()
|
||||
parts[0].to_string()
|
||||
};
|
||||
ColumnConfig { name, label }
|
||||
map.insert("label".to_string(), label);
|
||||
map
|
||||
})
|
||||
.collect();
|
||||
config_builder = config_builder.set_override("list_format", serde_json::to_value(columns)?)?;
|
||||
config_builder = config_builder.set_override("list_format", columns)?;
|
||||
}
|
||||
|
||||
if args.options.human_readable {
|
||||
@@ -135,11 +137,15 @@ impl Settings {
|
||||
}
|
||||
|
||||
if !args.item.meta_plugins.is_empty() {
|
||||
let meta_plugins: Vec<MetaPluginConfig> = args.item.meta_plugins
|
||||
let meta_plugins: Vec<std::collections::HashMap<String, String>> = args.item.meta_plugins
|
||||
.iter()
|
||||
.map(|name| MetaPluginConfig { name: name.clone() })
|
||||
.map(|name| {
|
||||
let mut map = std::collections::HashMap::new();
|
||||
map.insert("name".to_string(), name.clone());
|
||||
map
|
||||
})
|
||||
.collect();
|
||||
config_builder = config_builder.set_override("meta_plugins", serde_json::to_value(meta_plugins)?)?;
|
||||
config_builder = config_builder.set_override("meta_plugins", meta_plugins)?;
|
||||
}
|
||||
|
||||
let config = config_builder.build()?;
|
||||
|
||||
Reference in New Issue
Block a user