Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump edition to 2021 and MSRV to 1.63 #53

Merged
merged 4 commits into from
Dec 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
70 changes: 34 additions & 36 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,77 +13,75 @@ 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
rustup override set nightly
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
3 changes: 2 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }
Expand Down
7 changes: 3 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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+]
<br />
<br />
[![Dependency Status][deps.rs status]][deps.rs link]
Expand All @@ -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
Expand Down
5 changes: 0 additions & 5 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down