astreams: Mark activitystreams_rel as lenient

This commit is contained in:
Steffo 2024-12-28 02:42:04 +01:00
parent 8c191cf9ae
commit 71485b50af
Signed by: steffo
GPG key ID: 5ADA3868646C3FC0
3 changed files with 3 additions and 3 deletions

View file

@ -112,7 +112,7 @@ impl StreamsLink for &json_ld::Node {
)
}
fn activitystreams_rel(&self) -> impl Iterator<Item = AResult<String>> {
fn activitystreams_rel_lenient(&self) -> impl Iterator<Item = AResult<String>> {
self.jsonld_iter_value_string(
iri!("https://www.w3.org/ns/activitystreams#rel")
)

View file

@ -26,7 +26,7 @@ pub trait StreamsLink {
fn activitystreams_href(&self) -> Option<AResult<String>>;
// FIXME: This accepts any kind of string, and does not filter to HTML link relations
fn activitystreams_rel(&self) -> impl Iterator<Item = AResult<String>>;
fn activitystreams_rel_lenient(&self) -> impl Iterator<Item = AResult<String>>;
fn activitystreams_mediatype(&self) -> Option<AResult<MediaType>>;

View file

@ -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")
)