From e42aa6fe8e120bbd02697299ea5d076890911b62 Mon Sep 17 00:00:00 2001 From: Kitaiti Makoto Date: Sun, 13 Feb 2022 02:07:23 +0900 Subject: [PATCH] Implement From for Error --- plume-models/src/lib.rs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/plume-models/src/lib.rs b/plume-models/src/lib.rs index 18afde57..0720599b 100644 --- a/plume-models/src/lib.rs +++ b/plume-models/src/lib.rs @@ -16,6 +16,7 @@ extern crate serde_json; #[macro_use] extern crate tantivy; +use activitystreams::iri_string; pub use lettre; pub use lettre::smtp; use once_cell::sync::Lazy; @@ -100,6 +101,12 @@ impl From for Error { } } +impl From for Error { + fn from(_: iri_string::validate::Error) -> Self { + Error::Url + } +} + impl From for Error { fn from(_: serde_json::Error) -> Self { Error::SerDe