fix: replace const with function for table format and update is_terminal import

This commit is contained in:
Andrew Phillips (aider)
2025-05-10 12:42:04 -03:00
parent a2104ff705
commit f8b14cb570

View File

@@ -4,7 +4,8 @@ use clap::Command;
use std::path::PathBuf;
use std::str::FromStr;
use crate::modes::common::{format_size, string_column, FORMAT_BOX_CHARS_NO_BORDER_LINE_SEPARATOR};
use crate::modes::common::{format_size, string_column};
use is_terminal::IsTerminal;
use crate::compression::get_engine;
use crate::compression::CompressionType;
use crate::db::{get_item, get_item_last, get_item_matching};
@@ -50,7 +51,7 @@ pub fn mode_info(
let mut table = Table::new();
if std::io::stdout().is_terminal() {
table.set_format(*FORMAT_BOX_CHARS_NO_BORDER_LINE_SEPARATOR);
table.set_format(get_format_box_chars_no_border_line_separator());
} else {
table.set_format(*format::consts::FORMAT_NO_BORDER_LINE_SEPARATOR);
}