From bc85cdac6c1c70893eb577a2d394caf481a86d25 Mon Sep 17 00:00:00 2001 From: "Andrew Phillips (aider)" Date: Sat, 10 May 2025 12:45:14 -0300 Subject: [PATCH] fix: remove unused imports and non-const format builder --- src/main.rs | 1 - src/modes/common.rs | 5 +++-- src/modes/info.rs | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main.rs b/src/main.rs index e773d8f..0dc9a68 100644 --- a/src/main.rs +++ b/src/main.rs @@ -39,7 +39,6 @@ pub mod db; use compression::CompressionType; -use is_terminal::IsTerminal; extern crate term; diff --git a/src/modes/common.rs b/src/modes/common.rs index 2ce1d40..ac63e3f 100644 --- a/src/modes/common.rs +++ b/src/modes/common.rs @@ -45,7 +45,7 @@ pub fn size_column(size: u64, human_readable: bool, column_width: usize) -> Stri string_column(format_size(size, human_readable), column_width) } -pub const FORMAT_BOX_CHARS_NO_BORDER_LINE_SEPARATOR: prettytable::format::TableFormat = +pub fn get_format_box_chars_no_border_line_separator() -> TableFormat { prettytable::format::FormatBuilder::new() .column_separator('│') .borders('│') @@ -62,4 +62,5 @@ pub const FORMAT_BOX_CHARS_NO_BORDER_LINE_SEPARATOR: prettytable::format::TableF prettytable::format::LineSeparator::new('─', '┴', '└', '┘') ) .padding(1, 1) - .build(); + .build() +} diff --git a/src/modes/info.rs b/src/modes/info.rs index 5894fdf..273d5af 100644 --- a/src/modes/info.rs +++ b/src/modes/info.rs @@ -4,7 +4,7 @@ use clap::Command; use std::path::PathBuf; use std::str::FromStr; -use crate::modes::common::{format_size, string_column}; +use crate::modes::common::format_size; use is_terminal::IsTerminal; use crate::compression::get_engine; use crate::compression::CompressionType;