fix: replace const with function for table format and update is_terminal import
This commit is contained in:
@@ -4,7 +4,8 @@ use clap::Command;
|
|||||||
use std::path::PathBuf;
|
use std::path::PathBuf;
|
||||||
use std::str::FromStr;
|
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::get_engine;
|
||||||
use crate::compression::CompressionType;
|
use crate::compression::CompressionType;
|
||||||
use crate::db::{get_item, get_item_last, get_item_matching};
|
use crate::db::{get_item, get_item_last, get_item_matching};
|
||||||
@@ -50,7 +51,7 @@ pub fn mode_info(
|
|||||||
|
|
||||||
let mut table = Table::new();
|
let mut table = Table::new();
|
||||||
if std::io::stdout().is_terminal() {
|
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 {
|
} else {
|
||||||
table.set_format(*format::consts::FORMAT_NO_BORDER_LINE_SEPARATOR);
|
table.set_format(*format::consts::FORMAT_NO_BORDER_LINE_SEPARATOR);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user