Inline utils::whitespace

This commit is contained in:
Xavier Moffett 2025-02-09 22:39:25 -05:00
parent 83f6e6e43e
commit f5e5c01697
Signed by: Sapphirus
GPG key ID: A6C061B2CEA1A7AC
2 changed files with 5 additions and 7 deletions

View file

@ -25,7 +25,6 @@ use crate::{
constants::{BOLD, BOLD_YELLOW, RESET, YELLOW},
err,
impl_error,
utils::whitespace,
Error,
ErrorTrait,
};
@ -100,7 +99,7 @@ impl<'a> Table<'a> {
marker: Vec::new(),
column_attr: Vec::new(),
width_max: width,
whitespace: whitespace(width),
whitespace: " ".repeat(width),
spacing: 2,
dimensions: (0, 0),
built: false,
@ -322,7 +321,7 @@ mod test {
marker: Vec::new(),
column_attr: Vec::new(),
width_max: 80,
whitespace: whitespace(80),
whitespace: " ".repeat(80),
spacing: 2,
dimensions: (0, 0),
built: false,

View file

@ -33,7 +33,6 @@ use pacwrap_core::{
utils::{
arguments::Operand,
table::{ColumnAttribute, Table},
whitespace,
Arguments,
},
ErrorGeneric,
@ -209,15 +208,15 @@ pub fn list_containers(args: &mut Arguments) -> Result<()> {
println!(
"{}\nTotal Size: {}{} \nDifference: {}{} - {} {} \n{}Size on Disk{}: {}{}\n",
table.build()?,
whitespace(max_len - equation[0].len()),
" ".repeat(max_len - equation[0].len()),
equation[0],
*UNDERLINE,
whitespace(max_len - equation[1].len()),
" ".repeat(max_len - equation[1].len()),
equation[1],
*RESET,
*BOLD,
*RESET,
whitespace(max_len - equation[2].len()),
" ".repeat(max_len - equation[2].len()),
equation[2]
)
} else {