fix: Correct table cell alignment and string conversion
Co-authored-by: aider (openai/andrew/openrouter/deepseek/deepseek-chat-v3.1) <aider@aider.chat>
This commit is contained in:
@@ -145,10 +145,10 @@ pub fn mode_list(
|
||||
Cell::new(&string_column(item.id.unwrap_or(0).to_string(), column_width));
|
||||
match column.align {
|
||||
crate::config::ColumnAlignment::Right => {
|
||||
cell = cell.alignment(CellAlignment::Right);
|
||||
cell = cell.set_alignment(CellAlignment::Right);
|
||||
}
|
||||
crate::config::ColumnAlignment::Left => {
|
||||
cell = cell.alignment(CellAlignment::Left);
|
||||
cell = cell.set_alignment(CellAlignment::Left);
|
||||
}
|
||||
}
|
||||
cell
|
||||
@@ -163,10 +163,10 @@ pub fn mode_list(
|
||||
));
|
||||
match column.align {
|
||||
crate::config::ColumnAlignment::Right => {
|
||||
cell.align(Alignment::RIGHT);
|
||||
cell = cell.set_alignment(CellAlignment::Right);
|
||||
}
|
||||
crate::config::ColumnAlignment::Left => {
|
||||
cell.align(Alignment::LEFT);
|
||||
cell = cell.set_alignment(CellAlignment::Left);
|
||||
}
|
||||
}
|
||||
cell
|
||||
@@ -180,10 +180,10 @@ pub fn mode_list(
|
||||
));
|
||||
match column.align {
|
||||
crate::config::ColumnAlignment::Right => {
|
||||
cell.align(Alignment::RIGHT);
|
||||
cell = cell.set_alignment(CellAlignment::Right);
|
||||
}
|
||||
crate::config::ColumnAlignment::Left => {
|
||||
cell.align(Alignment::LEFT);
|
||||
cell = cell.set_alignment(CellAlignment::Left);
|
||||
}
|
||||
}
|
||||
cell
|
||||
@@ -199,10 +199,10 @@ pub fn mode_list(
|
||||
};
|
||||
match column.align {
|
||||
crate::config::ColumnAlignment::Right => {
|
||||
cell.align(Alignment::RIGHT);
|
||||
cell = cell.set_alignment(CellAlignment::Right);
|
||||
}
|
||||
crate::config::ColumnAlignment::Left => {
|
||||
cell.align(Alignment::LEFT);
|
||||
cell = cell.set_alignment(CellAlignment::Left);
|
||||
}
|
||||
}
|
||||
cell
|
||||
@@ -213,10 +213,10 @@ pub fn mode_list(
|
||||
Cell::new(&string_column(item.compression.to_string(), column_width));
|
||||
match column.align {
|
||||
crate::config::ColumnAlignment::Right => {
|
||||
cell.align(Alignment::RIGHT);
|
||||
cell = cell.set_alignment(CellAlignment::Right);
|
||||
}
|
||||
crate::config::ColumnAlignment::Left => {
|
||||
cell.align(Alignment::LEFT);
|
||||
cell = cell.set_alignment(CellAlignment::Left);
|
||||
}
|
||||
}
|
||||
cell
|
||||
@@ -230,10 +230,10 @@ pub fn mode_list(
|
||||
));
|
||||
match column.align {
|
||||
crate::config::ColumnAlignment::Right => {
|
||||
cell.align(Alignment::RIGHT);
|
||||
cell = cell.set_alignment(CellAlignment::Right);
|
||||
}
|
||||
crate::config::ColumnAlignment::Left => {
|
||||
cell.align(Alignment::LEFT);
|
||||
cell = cell.set_alignment(CellAlignment::Left);
|
||||
}
|
||||
}
|
||||
cell
|
||||
@@ -244,10 +244,10 @@ pub fn mode_list(
|
||||
.add_attribute(Attribute::Bold);
|
||||
match column.align {
|
||||
crate::config::ColumnAlignment::Right => {
|
||||
cell.align(Alignment::RIGHT);
|
||||
cell = cell.set_alignment(CellAlignment::Right);
|
||||
}
|
||||
crate::config::ColumnAlignment::Left => {
|
||||
cell.align(Alignment::LEFT);
|
||||
cell = cell.set_alignment(CellAlignment::Left);
|
||||
}
|
||||
}
|
||||
cell
|
||||
@@ -260,10 +260,10 @@ pub fn mode_list(
|
||||
));
|
||||
match column.align {
|
||||
crate::config::ColumnAlignment::Right => {
|
||||
cell.align(Alignment::RIGHT);
|
||||
cell = cell.set_alignment(CellAlignment::Right);
|
||||
}
|
||||
crate::config::ColumnAlignment::Left => {
|
||||
cell.align(Alignment::LEFT);
|
||||
cell = cell.set_alignment(CellAlignment::Left);
|
||||
}
|
||||
}
|
||||
cell
|
||||
@@ -272,10 +272,10 @@ pub fn mode_list(
|
||||
let mut cell = Cell::new(&string_column(tags.join(" "), column_width));
|
||||
match column.align {
|
||||
crate::config::ColumnAlignment::Right => {
|
||||
cell.align(Alignment::RIGHT);
|
||||
cell = cell.set_alignment(CellAlignment::Right);
|
||||
}
|
||||
crate::config::ColumnAlignment::Left => {
|
||||
cell.align(Alignment::LEFT);
|
||||
cell = cell.set_alignment(CellAlignment::Left);
|
||||
}
|
||||
}
|
||||
cell
|
||||
@@ -287,10 +287,10 @@ pub fn mode_list(
|
||||
Cell::new(&string_column(meta_value.to_string(), column_width));
|
||||
match column.align {
|
||||
crate::config::ColumnAlignment::Right => {
|
||||
cell.align(Alignment::RIGHT);
|
||||
cell = cell.set_alignment(CellAlignment::Right);
|
||||
}
|
||||
crate::config::ColumnAlignment::Left => {
|
||||
cell.align(Alignment::LEFT);
|
||||
cell = cell.set_alignment(CellAlignment::Left);
|
||||
}
|
||||
}
|
||||
cell
|
||||
@@ -299,10 +299,10 @@ pub fn mode_list(
|
||||
let mut cell = Cell::new("");
|
||||
match column.align {
|
||||
crate::config::ColumnAlignment::Right => {
|
||||
cell.align(Alignment::RIGHT);
|
||||
cell = cell.set_alignment(CellAlignment::Right);
|
||||
}
|
||||
crate::config::ColumnAlignment::Left => {
|
||||
cell.align(Alignment::LEFT);
|
||||
cell = cell.set_alignment(CellAlignment::Left);
|
||||
}
|
||||
}
|
||||
cell
|
||||
@@ -312,10 +312,10 @@ pub fn mode_list(
|
||||
let mut cell = Cell::new("");
|
||||
match column.align {
|
||||
crate::config::ColumnAlignment::Right => {
|
||||
cell.align(Alignment::RIGHT);
|
||||
cell = cell.set_alignment(CellAlignment::Right);
|
||||
}
|
||||
crate::config::ColumnAlignment::Left => {
|
||||
cell.align(Alignment::LEFT);
|
||||
cell = cell.set_alignment(CellAlignment::Left);
|
||||
}
|
||||
}
|
||||
cell
|
||||
|
||||
Reference in New Issue
Block a user