Skip to content

Commit

Permalink
add missing feature gates
Browse files Browse the repository at this point in the history
  • Loading branch information
pchampin committed Nov 14, 2023
1 parent a29aee4 commit 2144a63
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
4 changes: 2 additions & 2 deletions jsonld/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ keywords.workspace = true
[features]
default = []
# This feature enables retrieval of context via file: URLs
file_url = []
file_url = ["dep:url"]
# This feature enables retrieval of context over HTTP(S)
http_client = ["json-ld/reqwest"]

Expand All @@ -32,7 +32,7 @@ sophia_iri.workspace = true
sophia_term.workspace = true
thiserror.workspace = true
tokio.workspace = true
url.workspace = true
url = { workspace = true, optional = true }

[dev-dependencies]
sophia_turtle.workspace = true
1 change: 1 addition & 0 deletions jsonld/src/parser/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ fn check_http_loader() {
assert_eq!(got, exp);
}

#[cfg(feature = "file_url")]
// Check whether JsonLdParser<FileUrlLoader> correctly implements QuadParser
// (i.e. it has the correct trait bounds).
// NB: the goal is NOT to check the loader itself -- we actually don't use it.
Expand Down
1 change: 1 addition & 0 deletions resource/src/loader/_trait.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
use super::{util::*, *};
use crate::{Resource, ResourceError, TypedResource};
#[cfg(feature = "jsonld")]
use futures_util::FutureExt;
use sophia_api::graph::CollectibleGraph;
use sophia_api::parser::TripleParser;
Expand Down

0 comments on commit 2144a63

Please sign in to comment.