Radish alpha
h
Radicle Heartwood Protocol & Stack
Radicle
Git (anonymous pull)
Log in to clone via SSH
REVIEW: prefer FromStr over TryFrom<&str>
Fintan Halpenny committed 9 months ago
commit 5f57a6ef682bf1cc88c15a724a44bf6c0cf7a031
parent 6f4cf12dfe7fd45f980ad98df902da25974493b1
1 file changed +4 -4
modified crates/radicle/src/cob/common.rs
@@ -85,11 +85,11 @@ impl AsRef<str> for Title {
    }
}

-
impl TryFrom<&str> for Title {
-
    type Error = TitleError;
+
impl FromStr for Title {
+
    type Err = TitleError;

-
    fn try_from(value: &str) -> Result<Self, Self::Error> {
-
        Self::new(value)
+
    fn from_str(s: &str) -> Result<Self, Self::Err> {
+
        Self::new(s)
    }
}