CI: Validates Rust 1.60 compatibility

pull/332/head
Tpt 2 years ago committed by Thomas Tanon
parent 686e1edc8e
commit 92feec7e98
  1. 16
      .github/workflows/tests.yml
  2. 6
      lib/sparesults/src/json.rs
  3. 2
      server/src/main.rs

@ -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:

@ -274,8 +274,11 @@ impl<R: BufRead> JsonSolutionsReader<R> {
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<R: BufRead> JsonSolutionsReader<R> {
"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!(

@ -302,7 +302,7 @@ fn handle_request(request: &mut Request, store: Store) -> Result<Response, HttpE
request,
)
} else {
return Err(unsupported_media_type(&content_type));
Err(unsupported_media_type(&content_type))
}
}
(path, "GET") if path.starts_with("/store") => {

Loading…
Cancel
Save