diff --git a/server/src/newsreader.rs b/server/src/newsreader.rs index de09fc0..7fe1c90 100644 --- a/server/src/newsreader.rs +++ b/server/src/newsreader.rs @@ -190,18 +190,8 @@ pub async fn thread( let slug = r.site.unwrap_or("no-slug".to_string()); let site = r.name.unwrap_or("NO SITE".to_string()); let default_homepage = "http://no-homepage"; - let link = &r - .link - .as_ref() - .map(|h| { - if h.is_empty() { - default_homepage.to_string() - } else { - h.to_string() - } - }) - .map(|h| Url::parse(&h).ok()) - .flatten(); + // TODO: remove the various places that have this as an Option + let link = Some(Url::parse(&r.link)?); let mut body = r.summary.unwrap_or("NO SUMMARY".to_string()); let cacher = Arc::new(Mutex::new(FilesystemCacher::new(&config.slurp_cache_path)?)); let body_tranformers: Vec> = vec![