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 626e5df7a0e31291a4ac4f30b3eefcf7f659d3bd
parent 30ae6a3185c5ab9f3b6654a1982586a82b3cad91
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)
    }
}