Simplify impl of Display for some types

Micro-optimization, I know. ;-D

Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
This commit is contained in:
Matthias Beyer 2025-08-17 14:51:42 +02:00 committed by Fintan Halpenny
parent 787cb3a872
commit 9486e751f2
2 changed files with 3 additions and 3 deletions

View File

@ -58,7 +58,7 @@ impl Rev {
impl Display for Rev {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "{}", self.0)
self.0.fmt(f)
}
}

View File

@ -64,7 +64,7 @@ impl Author {
impl Display for Author {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
write!(f, "{}", self.id)
self.id.fmt(f)
}
}
@ -210,7 +210,7 @@ impl FromStr for Label {
impl Display for Label {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
write!(f, "{}", self.0)
self.0.fmt(f)
}
}