From bb45af93fc6608d5d4e52b2011bca35179441190 Mon Sep 17 00:00:00 2001 From: Andrew Phillips Date: Mon, 8 Sep 2025 19:08:37 -0300 Subject: [PATCH] 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) --- src/modes/common.rs | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/src/modes/common.rs b/src/modes/common.rs index a7cd6d8..a927695 100644 --- a/src/modes/common.rs +++ b/src/modes/common.rs @@ -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 {