From f6d542460c4e5958be7728b91edb0e9236ee603c Mon Sep 17 00:00:00 2001 From: daladim Date: Mon, 29 Mar 2021 09:29:56 +0200 Subject: [PATCH] Fixed a parsing bug --- src/item.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/item.rs b/src/item.rs index 7fd02db..6fd197d 100644 --- a/src/item.rs +++ b/src/item.rs @@ -1,3 +1,5 @@ +// TODO: move Event and Task to nest them in crate::items::calendar::Calendar? + use std::fmt::{Display, Formatter}; use std::str::FromStr; @@ -106,7 +108,8 @@ impl From<&Resource> for ItemId { impl FromStr for ItemId { type Err = url::ParseError; fn from_str(s: &str) -> Result { - s.parse() + let u: Url = s.parse()?; + Ok(Self::from(u)) } }