refactor: move path table creation to build_path_table function
This commit is contained in:
committed by
Andrew Phillips (aider)
parent
1358d634c1
commit
e9c6892111
@@ -113,37 +113,6 @@ pub fn mode_status(
|
||||
) -> Result<()> {
|
||||
let mut path_table = Table::new();
|
||||
|
||||
if std::io::stdout().is_terminal() {
|
||||
path_table.set_format(*FORMAT_BOX_CHARS_NO_BORDER_LINE_SEPARATOR);
|
||||
} else {
|
||||
path_table.set_format(*FORMAT_NO_BORDER_LINE_SEPARATOR);
|
||||
}
|
||||
|
||||
path_table.set_titles(Row::new(vec![
|
||||
Cell::new("Type").with_style(Attr::Bold),
|
||||
Cell::new("Path").with_style(Attr::Bold),
|
||||
]));
|
||||
|
||||
path_table.add_row(Row::new(vec![
|
||||
Cell::new("Data"),
|
||||
Cell::new(
|
||||
&data_path
|
||||
.into_os_string()
|
||||
.into_string()
|
||||
.expect("Unable to convert data path to string"),
|
||||
),
|
||||
]));
|
||||
|
||||
path_table.add_row(Row::new(vec![
|
||||
Cell::new("Database"),
|
||||
Cell::new(
|
||||
&db_path
|
||||
.into_os_string()
|
||||
.into_string()
|
||||
.expect("Unable to convert DB path to string"),
|
||||
),
|
||||
]));
|
||||
|
||||
let compression_table = build_compression_table(args, default_type());
|
||||
let path_table = build_path_table(data_path, db_path);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user