fix: Resolve compilation errors and warnings

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:07:58 -03:00
parent b88daca131
commit a8542d7dee
3 changed files with 8 additions and 5 deletions

View File

@@ -81,7 +81,7 @@ pub struct TableConfig {
pub truncation_indicator: String, pub truncation_indicator: String,
} }
#[derive(Debug, Clone, Serialize, Deserialize, Default)] #[derive(Debug, Clone, Serialize, Default)]
pub struct ColumnConfig { pub struct ColumnConfig {
pub name: String, pub name: String,
pub label: String, pub label: String,

View File

@@ -199,15 +199,18 @@ pub fn create_table_with_config(table_config: &crate::config::TableConfig) -> Ta
table.load_preset(comfy_table::presets::NOTHING); table.load_preset(comfy_table::presets::NOTHING);
} }
// Add more presets as needed // Add more presets as needed
table
} }
} }
// Apply modifiers // Apply modifiers
for modifier in &table_config.modifiers { for modifier in &table_config.modifiers {
match modifier.as_str() { match modifier.as_str() {
"UTF8_SOLID_INNER_BORDERS" => table.apply_modifier(comfy_table::modifiers::UTF8_SOLID_INNER_BORDERS), "UTF8_SOLID_INNER_BORDERS" => {
"UTF8_ROUND_CORNERS" => table.apply_modifier(comfy_table::modifiers::UTF8_ROUND_CORNERS), table.apply_modifier(comfy_table::modifiers::UTF8_SOLID_INNER_BORDERS);
}
"UTF8_ROUND_CORNERS" => {
table.apply_modifier(comfy_table::modifiers::UTF8_ROUND_CORNERS);
}
_ => {} // Ignore unknown modifiers _ => {} // Ignore unknown modifiers
} }
} }

View File

@@ -195,7 +195,7 @@ pub fn mode_list(
} }
// Apply padding if specified // Apply padding if specified
if let Some((left_padding, right_padding)) = column.padding { if let Some((_left_padding, _right_padding)) = column.padding {
// Note: comfy-table doesn't directly support padding, so we'd need to handle this // Note: comfy-table doesn't directly support padding, so we'd need to handle this
// by adding spaces to the content, or use a different approach // by adding spaces to the content, or use a different approach
} }