diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml
index 457f307..4254c4d 100644
--- a/.github/workflows/rust.yml
+++ b/.github/workflows/rust.yml
@@ -13,19 +13,21 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- - uses: actions/checkout@v2
+ - uses: actions/checkout@v4
- name: Build
run: cargo build --verbose
- name: Run tests
run: cargo test --verbose
- - name: Run tests for serde feature
+ - name: Run tests on no_std
+ run: cargo test --no-default-features --verbose
+ - name: Run tests for serde
run: cargo test --features serde --verbose
miri:
name: "Miri"
runs-on: ubuntu-latest
steps:
- - uses: actions/checkout@v2
+ - uses: actions/checkout@v4
- name: Install Miri
run: |
rustup toolchain install nightly --component miri
@@ -33,57 +35,53 @@ jobs:
cargo miri setup
- name: Test with Miri
run: MIRIFLAGS=-Zmiri-strict-provenance cargo miri test
- - name: Run tests for serde feature
- run: MIRIFLAGS=-Zmiri-strict-provenance cargo miri test --features serde
fmt:
runs-on: ubuntu-latest
steps:
- - uses: actions/checkout@v2
- - uses: actions-rs/toolchain@v1
+ - uses: actions/checkout@v4
+ - uses: dtolnay/rust-toolchain@master
with:
toolchain: stable
- profile: minimal
components: rustfmt
- override: true
- - uses: actions-rs/cargo@v1
+ - run: cargo fmt --all -- --check
+
+ msrv:
+ name: Rust ${{matrix.rust}}
+ runs-on: ubuntu-latest
+ strategy:
+ fail-fast: false
+ matrix:
+ rust: [1.63.0, 1.64.0]
+ timeout-minutes: 45
+ steps:
+ - uses: actions/checkout@v4
+ - uses: dtolnay/rust-toolchain@master
with:
- command: fmt
- args: --all -- --check
-
-
+ toolchain: ${{matrix.rust}}
+ - run: cargo build
+ - run: cargo test
+ - run: cargo test --no-default-features
+ - run: cargo test --features serde
+
clippy:
runs-on: ubuntu-latest
steps:
- - uses: actions/checkout@v2
- - uses: actions-rs/toolchain@v1
+ - uses: actions/checkout@v4
+ - uses: dtolnay/rust-toolchain@master
with:
toolchain: stable
- profile: minimal
components: clippy
- override: true
- - uses: actions-rs/clippy-check@v1
- env:
- PWD: ${{ env.GITHUB_WORKSPACE }}
- with:
- token: ${{ secrets.GITHUB_TOKEN }}
- args: --workspace --tests --examples
-
-
+ - run: cargo clippy --workspace --tests --examples
+
docs:
runs-on: ubuntu-latest
env:
RUSTDOCFLAGS: -Dwarnings
steps:
- - uses: actions/checkout@v2
- - uses: actions-rs/toolchain@v1
+ - uses: actions/checkout@v4
+ - uses: dtolnay/rust-toolchain@master
with:
toolchain: stable
- profile: minimal
- components: rust-docs
- override: true
- - uses: swatinem/rust-cache@v1
- - uses: actions-rs/cargo@v1
- with:
- command: doc
- args: --workspace --no-deps
+ - uses: swatinem/rust-cache@v2
+ - run: cargo doc --workspace --no-deps
diff --git a/Cargo.toml b/Cargo.toml
index 9c343c9..b7bdd17 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -9,7 +9,8 @@ homepage = "https://github.com/contain-rs/bit-set"
documentation = "https://docs.rs/bit-set/"
keywords = ["data-structures", "bitset"]
readme = "README.md"
-edition = "2015"
+edition = "2021"
+rust-version = "1.63"
[dependencies]
serde = { version = "1.0", features = ["derive"], optional = true }
diff --git a/README.md b/README.md
index 28a9adb..3fa4e26 100644
--- a/README.md
+++ b/README.md
@@ -8,7 +8,7 @@
[![crates.io][crates.io shield]][crates.io link]
[![Documentation][docs.rs badge]][docs.rs link]
![Rust CI][github ci badge]
-[![rustc 1.0+]][Rust 1.0]
+![rustc 1.63+]
[![Dependency Status][deps.rs status]][deps.rs link]
@@ -21,9 +21,8 @@
[crates.io link]: https://crates.io/crates/bit-set
[docs.rs badge]: https://docs.rs/bit-set/badge.svg?version=0.8.0
[docs.rs link]: https://docs.rs/bit-set/0.8.0/bit_set/
-[github ci badge]: https://github.com/contain-rs/linked-hash-map/workflows/Rust/badge.svg?branch=master
-[rustc 1.0+]: https://img.shields.io/badge/rustc-1.0%2B-blue.svg
-[Rust 1.0]: https://blog.rust-lang.org/2015/05/15/Rust-1.0.html
+[github ci badge]: https://github.com/contain-rs/bit-set/workflows/Rust/badge.svg?branch=master
+[rustc 1.63+]: https://img.shields.io/badge/rustc-1.63%2B-blue.svg
[deps.rs status]: https://deps.rs/crate/bit-set/0.8.0/status.svg
[deps.rs link]: https://deps.rs/crate/bit-set/0.8.0
[shields.io download count]: https://img.shields.io/crates/d/bit-set.svg
diff --git a/src/lib.rs b/src/lib.rs
index 30bf8ce..6d4a643 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -51,11 +51,6 @@
#![doc(html_root_url = "https://docs.rs/bit-set/0.8.0")]
#![no_std]
-extern crate bit_vec;
-
-#[cfg(feature = "serde")]
-extern crate serde;
-
#[cfg(any(test, feature = "std"))]
extern crate std;