1 Commits

Author SHA1 Message Date
bors[bot]
142d3e940a Merge #30
30: Implement OnceLock r=bertptrs a=bertptrs

1.70 brought `OnceLock`. This needs a new wrapper and should replace all usage of `lazy_static!`, as well as the current internal implementation of OnceLock.

Co-authored-by: Bert Peters <bert@bertptrs.nl>
2023-08-27 09:23:16 +00:00
2 changed files with 29 additions and 9 deletions

View File

@@ -21,28 +21,48 @@ jobs:
- nightly - nightly
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v2
- uses: dtolnay/rust-toolchain@v1 - uses: actions-rs/toolchain@v1
with: with:
profile: minimal
toolchain: ${{ matrix.rust }} toolchain: ${{ matrix.rust }}
override: true
components: rustfmt, clippy components: rustfmt, clippy
- run: cargo build --all-features --all-targets - uses: actions-rs/cargo@v1
- run: cargo test --all-features with:
- run: cargo fmt --all -- --check command: build
- run: cargo clippy --all-features --all-targets -- -D warnings # --all-targets ensures that we also build the benchmarks and tests already.
args: --all-features --all-targets
- uses: actions-rs/cargo@v1
with:
command: test
args: --all-features
- uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check
- uses: actions-rs/cargo@v1
with:
command: clippy
args: --all-features --all-targets -- -D warnings
docs: docs:
name: Documentation build name: Documentation build
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v2
- uses: dtolnay/rust-toolchain@v1 - uses: actions-rs/toolchain@v1
with: with:
profile: minimal
toolchain: nightly toolchain: nightly
override: true
- name: Build documentation - name: Build documentation
env: env:

View File

@@ -23,7 +23,7 @@ lock_api = { version = "0.4", optional = true }
parking_lot = { version = "0.12", optional = true } parking_lot = { version = "0.12", optional = true }
[dev-dependencies] [dev-dependencies]
criterion = "0.5" criterion = "0.3"
rand = "0.8" rand = "0.8"
[[bench]] [[bench]]