fix: Resolve multiple ColumnConfig definitions and type mismatches
Co-authored-by: aider (openai/andrew/openrouter/deepseek/deepseek-chat-v3.1) <aider@aider.chat>
This commit is contained in:
@@ -177,10 +177,10 @@ pub fn create_table_with_config(table_config: &crate::config::TableConfig) -> Ta
|
||||
|
||||
// Set content arrangement
|
||||
match table_config.content_arrangement {
|
||||
ContentArrangement::Dynamic => table.set_content_arrangement(ContentArrangement::Dynamic),
|
||||
ContentArrangement::DynamicFullWidth => table.set_content_arrangement(ContentArrangement::DynamicFullWidth),
|
||||
ContentArrangement::Disabled => table.set_content_arrangement(ContentArrangement::Disabled),
|
||||
}
|
||||
crate::config::ContentArrangement::Dynamic => table.set_content_arrangement(comfy_table::ContentArrangement::Dynamic),
|
||||
crate::config::ContentArrangement::DynamicFullWidth => table.set_content_arrangement(comfy_table::ContentArrangement::DynamicFullWidth),
|
||||
crate::config::ContentArrangement::Disabled => table.set_content_arrangement(comfy_table::ContentArrangement::Disabled),
|
||||
};
|
||||
|
||||
// Set style preset
|
||||
match &table_config.style {
|
||||
@@ -199,6 +199,7 @@ pub fn create_table_with_config(table_config: &crate::config::TableConfig) -> Ta
|
||||
table.load_preset(comfy_table::presets::NOTHING);
|
||||
}
|
||||
// Add more presets as needed
|
||||
table
|
||||
}
|
||||
}
|
||||
|
||||
@@ -207,8 +208,6 @@ pub fn create_table_with_config(table_config: &crate::config::TableConfig) -> Ta
|
||||
match modifier.as_str() {
|
||||
"UTF8_SOLID_INNER_BORDERS" => table.apply_modifier(comfy_table::modifiers::UTF8_SOLID_INNER_BORDERS),
|
||||
"UTF8_ROUND_CORNERS" => table.apply_modifier(comfy_table::modifiers::UTF8_ROUND_CORNERS),
|
||||
"UTF8_NO_BORDERS" => table.apply_modifier(comfy_table::modifiers::UTF8_NO_BORDERS),
|
||||
"UTF8_NO_LINES" => table.apply_modifier(comfy_table::modifiers::UTF8_NO_LINES),
|
||||
_ => {} // Ignore unknown modifiers
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user