diff --git a/activitystreams-types/src/primitives/xsd_any_uri.rs b/activitystreams-types/src/primitives/xsd_any_uri.rs index 72a1e2d..5f1d7ef 100644 --- a/activitystreams-types/src/primitives/xsd_any_uri.rs +++ b/activitystreams-types/src/primitives/xsd_any_uri.rs @@ -5,6 +5,18 @@ pub struct XsdAnyUri(url::Url); #[error("Could not parse XsdAnyUri")] pub struct XsdAnyUriError; +impl From for XsdAnyUri { + fn from(u: url::Url) -> Self { + XsdAnyUri(u) + } +} + +impl From for url::Url { + fn from(u: XsdAnyUri) -> Self { + u.0 + } +} + impl Default for XsdAnyUri { fn default() -> Self { "data:text/plain,uwu".parse().unwrap()