Skip to content

Commit

Permalink
refactor: support stable Rust toolchain but keep using nightly rustfm…
Browse files Browse the repository at this point in the history
…t, release 0.3.0
  • Loading branch information
KonradHoeffner committed May 14, 2024
1 parent e37b707 commit 1d1420d
Show file tree
Hide file tree
Showing 8 changed files with 11 additions and 9 deletions.
6 changes: 5 additions & 1 deletion .github/workflows/lint_and_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Rust
- name: Install nightly Rust
uses: dtolnay/rust-toolchain@master
with:
components: rustfmt,clippy
Expand All @@ -46,3 +46,7 @@ jobs:
run: cargo clippy --no-deps --all-features
- name: check
run: cargo check
- name: Install stable Rust
uses: dtolnay/rust-toolchain@stable
- name: check on stable Rust
run: cargo check
3 changes: 1 addition & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,8 @@ jobs:
- name: Checkout
uses: actions/checkout@v4
- name: Install rust
uses: dtolnay/rust-toolchain@master
uses: dtolnay/rust-toolchain@stable
with:
toolchain: nightly-2024-02-17
targets: ${{ matrix.target }}
- name: Set up cargo cache
uses: actions/cache@v4
Expand Down
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "rickview"
version = "0.2.14"
version = "0.3.0"
edition = "2021"
license = "MIT"
keywords = ["rdf", "semantic-web", "linked-data"]
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# syntax=docker/dockerfile:1
FROM clux/muslrust:1.78.0-nightly-2024-02-17 AS chef
FROM clux/muslrust:1.78.0-stable AS chef
USER root
RUN cargo install cargo-chef
WORKDIR /app
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ Konrad Höffner (2023). RickView: Lightweight Standalone Knowledge Graph Browsin

### Contribute
We are happy to receive pull requests.
Please use `cargo fmt` before committing and make sure that that the code compiles on the newest nightly toolchain with the default features.
Please use `cargo +nightly fmt` before committing and make sure that that the code compiles on the newest stable and nightly toolchain with the default features.
Browse the default knowledge base after `cargo run` and verify that nothing is broken.
`cargo clippy` should not report any warnings.
You can also contribute by recommending RickView and by [sharing your RickView deployments](https://github.com/KonradHoeffner/hdt/issues/35).
1 change: 0 additions & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
#![deny(rust_2018_idioms)]
// don't use let chains until supported by rustfmt
//#![feature(let_chains)]
#![feature(btree_extract_if)]
//! Lightweight and performant RDF browser.
//! An RDF browser is a web application that *resolves* RDF resources: given the HTTP(s) URL identifying a resource it returns an HTML summary.
//! Besides HTML, the RDF serialization formats RDF/XML, Turtle and N-Triples are also available using content negotiation.
Expand Down
2 changes: 1 addition & 1 deletion src/rdf.rs
Original file line number Diff line number Diff line change
Expand Up @@ -414,7 +414,7 @@ pub fn resource(subject: Iri<&str>) -> Resource {

let source = deskolemize(&subject);
let mut all_directs = properties(&PropertyType::Direct, &source);
let descriptions = convert(all_directs.extract_if(|k, _v| config().description_properties.contains(k)).collect());
let descriptions = convert(config().description_properties.iter().filter_map(|p| all_directs.remove_entry(p)).collect());
let directs = convert(all_directs);
let title = titles().get(&piri.full).unwrap_or(&suffix).to_string().replace(SKOLEM_START, "Blank Node ");
let main_type = types().get(&suffix).cloned();
Expand Down

0 comments on commit 1d1420d

Please sign in to comment.