Radish alpha
h
Radicle Heartwood Protocol & Stack
Radicle
Git (anonymous pull)
Log in to clone via SSH
Simplify impl of Display for some types
◌ CI pending Matthias Beyer committed 9 months ago
commit d40f3a6d0d85b770e3a4be7cf538fdbe4bdffa2e
parent 840ec060fae07093554ecd950f53acf430a29a0c
1 pending (1 total) View logs
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)
    }
}