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:
parent
787cb3a872
commit
9486e751f2
|
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue