From b4766258ba86f4e9124d7ce29b18e49ab1d06f9c Mon Sep 17 00:00:00 2001 From: fdai7375 Date: Thu, 2 Feb 2023 18:50:14 +0100 Subject: [PATCH] refactoring: remove unnecessary padding function --- src/builtins/ls.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/builtins/ls.rs b/src/builtins/ls.rs index 5779b72..f2a2a28 100644 --- a/src/builtins/ls.rs +++ b/src/builtins/ls.rs @@ -116,14 +116,14 @@ fn format_line( permissions: Permissions, ) -> String { format!( - "{} | {:4} | {:6} | {} | {} | {} | {} |", + "{} | {:4} | {:6} | {:<10} | {:<10} | {:<10} | {:<5} |", right_padding(file_name, max_name_len), file_type, format_filesize(file_size), - right_padding(&format_date(modified), 10), - right_padding(&format_date(accessed), 10), - right_padding(&format_date(created), 10), - right_padding(&permissions.readonly().to_string(), 5), + format_date(modified), + format_date(accessed), + format_date(created), + permissions.readonly().to_string(), ) }