diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index b2814580..1a1c09cd 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -37,6 +37,22 @@ jobs: working-directory: ./lib/spargebra - run: cargo clippy --all-targets --all-features + clippy_msv: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + with: + submodules: true + - run: rustup override set 1.60.0 && rustup component add clippy + - run: cargo clippy -- -D warnings -D clippy::all + working-directory: ./lib/oxrdf + - run: cargo clippy -- -D warnings -D clippy::all + working-directory: ./lib/sparesults + - run: cargo clippy -- -D warnings -D clippy::all + working-directory: ./lib/spargebra + - run: cargo clippy -- -D warnings -D clippy::all + working-directory: ./server + deny: runs-on: ubuntu-latest steps: diff --git a/lib/sparesults/src/json.rs b/lib/sparesults/src/json.rs index dad446c8..ded01047 100644 --- a/lib/sparesults/src/json.rs +++ b/lib/sparesults/src/json.rs @@ -274,8 +274,11 @@ impl JsonSolutionsReader { let mut value = None; let mut lang = None; let mut datatype = None; + #[cfg(feature = "rdf-star")] let mut subject = None; + #[cfg(feature = "rdf-star")] let mut predicate = None; + #[cfg(feature = "rdf-star")] let mut object = None; if self.reader.read_event(&mut self.buffer)? != JsonEvent::StartObject { return Err(SyntaxError::msg("Term serializations should be an object").into()); @@ -287,10 +290,13 @@ impl JsonSolutionsReader { "value" => state = Some(State::Value), "xml:lang" => state = Some(State::Lang), "datatype" => state = Some(State::Datatype), + #[cfg(feature = "rdf-star")] "subject" => subject = Some(self.read_value(number_of_recursive_calls + 1)?), + #[cfg(feature = "rdf-star")] "predicate" => { predicate = Some(self.read_value(number_of_recursive_calls + 1)?) } + #[cfg(feature = "rdf-star")] "object" => object = Some(self.read_value(number_of_recursive_calls + 1)?), _ => { return Err(SyntaxError::msg(format!( diff --git a/server/src/main.rs b/server/src/main.rs index addfd0a7..35840e89 100644 --- a/server/src/main.rs +++ b/server/src/main.rs @@ -302,7 +302,7 @@ fn handle_request(request: &mut Request, store: Store) -> Result {