diff --git a/ldp/src/rdf_source.rs b/ldp/src/rdf_source.rs index 7ccff14..271b958 100644 --- a/ldp/src/rdf_source.rs +++ b/ldp/src/rdf_source.rs @@ -117,6 +117,7 @@ impl SerializationOptions { /// Filter triples that match the predicate. /// /// A return value of `true` means that it the triple ought to be included in the serialization. + #[must_use] pub fn with_filter(self, filter: F) -> Self where F: Fn(TripleRef<'_>) -> bool + 'static, diff --git a/ldp/src/resource.rs b/ldp/src/resource.rs index 8c2099d..48d31a2 100644 --- a/ldp/src/resource.rs +++ b/ldp/src/resource.rs @@ -46,6 +46,7 @@ impl ResourceRequestBuilder { } /// Creates a new request with the given HTTP client. + #[must_use] pub fn with_client_and_url(client: ClientWithMiddleware, url: Url) -> Self { Self { client, @@ -56,6 +57,7 @@ impl ResourceRequestBuilder { } /// If the HTTP response includes a [describedby](https://www.w3.org/TR/ldp/#link-relation-describedby) link rel, then it will be followed. + #[must_use] pub fn follow_described_by(mut self, value: bool) -> Self { self.follow_described_by = value; self @@ -65,12 +67,14 @@ impl ResourceRequestBuilder { /// /// Repeated calls are additive. By default, all formats — even non-RDF formats — are accepted. /// If your intention is to process non-RDF data, then this should not be called. + #[must_use] pub fn accept_rdf_format(mut self, format: RdfFormat) -> Self { self.formats.push(format); self } /// Restrict the request to all the formats supported by the underlying parser. + #[must_use] pub fn accept_all_rdf_formats(mut self) -> Self { self.formats = vec![ RdfFormat::N3,