PruneMark: implement display without the write! macro

by using write_str instead

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
This commit is contained in:
Dominik Csapak 2021-10-28 11:47:53 +02:00 committed by Wolfgang Bumiller
parent d4e9d5470e
commit 342ed4aea0

View File

@ -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)
})
}
}