diff --git a/radicle-cli/examples/rad-patch.md b/radicle-cli/examples/rad-patch.md index 0b9c7824..1e3a7347 100644 --- a/radicle-cli/examples/rad-patch.md +++ b/radicle-cli/examples/rad-patch.md @@ -56,7 +56,7 @@ $ rad patch - YOU PROPOSED - define power requirements d4ef85f57a8 R0 3e674d1 (flux-capacitor-power) ahead 1, behind 0 -└─ * opened by z6MknSLrJoTcukLrE435hVNQT4JUhbvWLX4kUzqkEStBU8Vi (you) [..] +└─ * opened by did:key:z6MknSLrJoTcukLrE435hVNQT4JUhbvWLX4kUzqkEStBU8Vi (you) [..] └─ * patch id d4ef85f57a849bd845915d7a66a2192cd23811f6 - OTHERS PROPOSED - diff --git a/radicle-httpd/src/api/test.rs b/radicle-httpd/src/api/test.rs index 19179425..6feae697 100644 --- a/radicle-httpd/src/api/test.rs +++ b/radicle-httpd/src/api/test.rs @@ -1,3 +1,4 @@ +use std::convert::TryInto as _; use std::path::Path; use std::str::FromStr; use std::sync::Arc; @@ -81,7 +82,8 @@ pub fn seed(dir: &Path) -> Context { .unwrap(); // eq. rad auth - let profile = radicle::Profile::init(rad_home.into(), PASSWORD.to_owned()).unwrap(); + let profile = + radicle::Profile::init(rad_home.try_into().unwrap(), PASSWORD.to_owned()).unwrap(); // rad init rad_init::init( diff --git a/radicle/src/profile.rs b/radicle/src/profile.rs index 2302fe1c..d0389303 100644 --- a/radicle/src/profile.rs +++ b/radicle/src/profile.rs @@ -163,9 +163,11 @@ pub struct Home { path: PathBuf, } -impl From for Home { - fn from(path: PathBuf) -> Self { - Self { path } +impl TryFrom for Home { + type Error = io::Error; + + fn try_from(home: PathBuf) -> Result { + Self::new(home) } }