fix: move format constant to common and update stdout check
This commit is contained in:
@@ -44,3 +44,24 @@ pub fn string_column(s: String, column_width: usize) -> String {
|
||||
pub fn size_column(size: u64, human_readable: bool, column_width: usize) -> String {
|
||||
string_column(format_size(size, human_readable), column_width)
|
||||
}
|
||||
|
||||
pub const FORMAT_BOX_CHARS_NO_BORDER_LINE_SEPARATOR: prettytable::format::TableFormat =
|
||||
prettytable::format::FormatBuilder::new()
|
||||
.column_separator('│')
|
||||
.borders('│')
|
||||
.separators(
|
||||
&[prettytable::format::LinePosition::Top],
|
||||
prettytable::format::LineSeparator::new('─', '┬', '┌', '┐')
|
||||
)
|
||||
.separators(
|
||||
&[prettytable::format::LinePosition::Title],
|
||||
prettytable::format::LineSeparator::new('─', '┼', '├', '┤')
|
||||
)
|
||||
.separators(
|
||||
&[prettytable::format::LinePosition::Bottom],
|
||||
prettytable::format::LineSeparator::new('─', '┴', '└', '┘')
|
||||
)
|
||||
.padding(1, 1)
|
||||
.build();
|
||||
string_column(format_size(size, human_readable), column_width)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user