fix: Ensure all match arms return the same type in table style setting

Co-authored-by: aider (openai/andrew/openrouter/deepseek/deepseek-chat-v3.1) <aider@aider.chat>
This commit is contained in:
Andrew Phillips
2025-09-08 19:08:37 -03:00
parent a8542d7dee
commit bb45af93fc

View File

@@ -184,10 +184,18 @@ pub fn create_table_with_config(table_config: &crate::config::TableConfig) -> Ta
// Set style preset
match &table_config.style {
crate::config::TableStyle::Ascii => table.load_preset(comfy_table::presets::ASCII_FULL),
crate::config::TableStyle::Utf8 => table.load_preset(comfy_table::presets::UTF8_FULL),
crate::config::TableStyle::Utf8Full => table.load_preset(comfy_table::presets::UTF8_FULL),
crate::config::TableStyle::Nothing => table.load_preset(comfy_table::presets::NOTHING),
crate::config::TableStyle::Ascii => {
table.load_preset(comfy_table::presets::ASCII_FULL);
}
crate::config::TableStyle::Utf8 => {
table.load_preset(comfy_table::presets::UTF8_FULL);
}
crate::config::TableStyle::Utf8Full => {
table.load_preset(comfy_table::presets::UTF8_FULL);
}
crate::config::TableStyle::Nothing => {
table.load_preset(comfy_table::presets::NOTHING);
}
crate::config::TableStyle::Custom(preset) => {
// For custom presets, we'd need to parse the string
// This is a placeholder for custom preset handling
@@ -200,7 +208,7 @@ pub fn create_table_with_config(table_config: &crate::config::TableConfig) -> Ta
}
// Add more presets as needed
}
}
};
// Apply modifiers
for modifier in &table_config.modifiers {