From 7e043a652ca7a9c48582e8a7ed784715d3eaa1aa Mon Sep 17 00:00:00 2001 From: qwjyh Date: Mon, 2 Dec 2024 02:53:30 +0900 Subject: [PATCH] update: don't display devices with no backups in cmd_status --- src/cmd_status.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/cmd_status.rs b/src/cmd_status.rs index 7c7f7f2..5215ac7 100644 --- a/src/cmd_status.rs +++ b/src/cmd_status.rs @@ -95,6 +95,10 @@ pub(crate) fn cmd_status( .unwrap_or(5); for (backup_device, covering_backups) in covering_backup { + if covering_backups.is_empty() { + continue; + } + println!("Device: {}", backup_device.name()); for (backup, path_from_backup) in covering_backups { let (last_backup, style) = match backup.last_backup() {