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:
parent
d4e9d5470e
commit
342ed4aea0
@ -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)
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user