Browse Source

refactoring: remove unnecessary padding function

main
fdai7375 2 years ago
committed by fdai7451
parent
commit
b4766258ba
  1. 10
      src/builtins/ls.rs

10
src/builtins/ls.rs

@ -116,14 +116,14 @@ fn format_line(
permissions: Permissions, permissions: Permissions,
) -> String { ) -> String {
format!( format!(
"{} | {:4} | {:6} | {} | {} | {} | {} |",
"{} | {:4} | {:6} | {:<10} | {:<10} | {:<10} | {:<5} |",
right_padding(file_name, max_name_len), right_padding(file_name, max_name_len),
file_type, file_type,
format_filesize(file_size), 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(),
) )
} }

Loading…
Cancel
Save