Skip to content

Commit e5c76e8

Browse files
committed
refactor: simplify print_row function call in backups display
1 parent c32efde commit e5c76e8

File tree

1 file changed

+2
-9
lines changed

1 file changed

+2
-9
lines changed

src/plugins/history_logs.rs

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -58,15 +58,7 @@ impl HistoryLogs {
5858
let print_row = |id: &str, slug: &str, db: &str, filename: &str, host: &str, date: &str, size: &str, encrypt: &str, compress: &str| {
5959
println!(
6060
"| {:<idw$} | {:<slugw$} | {:<dbw$} | {:<fnw$} | {:<hostw$} | {:<datew$} | {:>sizew$} | {:<encw$} | {:<compw$} |",
61-
id,
62-
slug,
63-
db,
64-
filename,
65-
host,
66-
date,
67-
size,
68-
encrypt,
69-
compress,
61+
id, slug, db, filename, host, date, size, encrypt, compress,
7062
idw = max_id,
7163
slugw = max_slug,
7264
dbw = max_db,
@@ -103,6 +95,7 @@ impl HistoryLogs {
10395
for (id, slug, db, filename, host, created_at, size, encrypt, compress) in backups {
10496
let replaced = created_at.replace("T", " ");
10597
let date = replaced.split('.').next().unwrap_or(&created_at);
98+
10699
print_row(
107100
&id.to_string(),
108101
&slug,

0 commit comments

Comments
 (0)