Radish alpha
h
Radicle Heartwood Protocol & Stack
Radicle
Git (anonymous pull)
Log in to clone via SSH
Simplify impl of Display for some types
Matthias Beyer committed 8 months ago
commit 7a2f43396bbb1ec364d3dee638ffe07bc2c510d1
parent dc189f3151a5ce7ab8f26549c17158d26ae86702
2 files changed +3 -3
modified crates/radicle-cli/src/git.rs
@@ -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)
    }
}

modified crates/radicle/src/cob/common.rs
@@ -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)
    }
}