From eefa297aa0b639cb48430d404888c946cf69e6c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabian=20Gr=C3=BCnbichler?= Date: Mon, 16 May 2022 10:42:07 +0200 Subject: [PATCH] BackupDir: stop implementing Display MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit the api type implements it already, all call sites should rather use DatastoreWithName and pbs_api_types::BackupDir for logging/.. Signed-off-by: Fabian Grünbichler --- pbs-datastore/src/backup_info.rs | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/pbs-datastore/src/backup_info.rs b/pbs-datastore/src/backup_info.rs index f8ac099f..68f8dad1 100644 --- a/pbs-datastore/src/backup_info.rs +++ b/pbs-datastore/src/backup_info.rs @@ -597,20 +597,6 @@ impl From for pbs_api_types::BackupDir { } } -impl fmt::Display for BackupDir { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - if self.ns.is_root() { - write!(f, "{}/{}", self.dir.group, self.backup_time_string) - } else { - write!( - f, - "[{}]:{}/{}", - self.ns, self.dir.group, self.backup_time_string - ) - } - } -} - /// Detailed Backup Information, lists files inside a BackupDir #[derive(Clone, Debug)] pub struct BackupInfo {