From 71485b50af7e735880aececfed1992241aaed7ec Mon Sep 17 00:00:00 2001 From: Stefano Pigozzi Date: Sat, 28 Dec 2024 02:42:04 +0100 Subject: [PATCH] `astreams`: Mark `activitystreams_rel` as lenient --- acrate_astreams/src/activitystreams/jsonld.rs | 2 +- acrate_astreams/src/activitystreams/mod.rs | 2 +- acrate_astreams/tests/test_activitystreams.rs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/acrate_astreams/src/activitystreams/jsonld.rs b/acrate_astreams/src/activitystreams/jsonld.rs index e1970cc..8ed1759 100644 --- a/acrate_astreams/src/activitystreams/jsonld.rs +++ b/acrate_astreams/src/activitystreams/jsonld.rs @@ -112,7 +112,7 @@ impl StreamsLink for &json_ld::Node { ) } - fn activitystreams_rel(&self) -> impl Iterator> { + fn activitystreams_rel_lenient(&self) -> impl Iterator> { self.jsonld_iter_value_string( iri!("https://www.w3.org/ns/activitystreams#rel") ) diff --git a/acrate_astreams/src/activitystreams/mod.rs b/acrate_astreams/src/activitystreams/mod.rs index dbac944..5a46f25 100644 --- a/acrate_astreams/src/activitystreams/mod.rs +++ b/acrate_astreams/src/activitystreams/mod.rs @@ -26,7 +26,7 @@ pub trait StreamsLink { fn activitystreams_href(&self) -> Option>; // FIXME: This accepts any kind of string, and does not filter to HTML link relations - fn activitystreams_rel(&self) -> impl Iterator>; + fn activitystreams_rel_lenient(&self) -> impl Iterator>; fn activitystreams_mediatype(&self) -> Option>; diff --git a/acrate_astreams/tests/test_activitystreams.rs b/acrate_astreams/tests/test_activitystreams.rs index d6a5ecc..009b8f7 100644 --- a/acrate_astreams/tests/test_activitystreams.rs +++ b/acrate_astreams/tests/test_activitystreams.rs @@ -233,7 +233,7 @@ async fn test_link_rel() { let mut rels = { use acrate_astreams::activitystreams::StreamsLink; - node.activitystreams_rel() + node.activitystreams_rel_lenient() .map(|v| v .expect("Property `rel` failed to process") )