From 342ed4aea0506ebc80f40ed50b1933a366f9cc4c Mon Sep 17 00:00:00 2001 From: Dominik Csapak Date: Thu, 28 Oct 2021 11:47:53 +0200 Subject: [PATCH] PruneMark: implement display without the write! macro by using write_str instead Signed-off-by: Dominik Csapak Signed-off-by: Wolfgang Bumiller --- pbs-datastore/src/prune.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/pbs-datastore/src/prune.rs b/pbs-datastore/src/prune.rs index c144b3db..f968e718 100644 --- a/pbs-datastore/src/prune.rs +++ b/pbs-datastore/src/prune.rs @@ -22,13 +22,12 @@ impl PruneMark { impl std::fmt::Display for PruneMark { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - let txt = match self { + f.write_str(match self { PruneMark::Protected => "protected", PruneMark::Keep => "keep", PruneMark::KeepPartial => "keep-partial", PruneMark::Remove => "remove", - }; - write!(f, "{}", txt) + }) } }