Skip to content

Commit

Permalink
Upgrade to edition 2021, set MSRV
Browse files Browse the repository at this point in the history
I used `cargo msrv -- cargo test` tool to find that 1.56.1 is the oldest satisfied MSRV
  • Loading branch information
nyurik committed Dec 12, 2023
1 parent aaaf5c7 commit 5d907d6
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
16 changes: 11 additions & 5 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Build
run: cargo build --verbose
- name: Run tests
Expand All @@ -22,13 +22,19 @@ jobs:
msrv:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install MSRV version
run: cargo install
- uses: actions/checkout@v4
- name: Read crate metadata
id: metadata
run: echo "rust-version=$(sed -ne 's/rust-version *= *\"\(.*\)\"/\1/p' Cargo.toml)" >> $GITHUB_OUTPUT
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
toolchain: ${{ steps.metadata.outputs.rust-version }}
- run: cargo test --verbose

fmt:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Build
run: cargo fmt --check
1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ repository = "https://github.com/servo/rust-fnv"
documentation = "https://doc.servo.org/fnv/"
categories = ["algorithms", "data-structures"]
edition = "2021"
rust-version = "1.56.1"

[lib]
name = "fnv"
Expand Down

0 comments on commit 5d907d6

Please sign in to comment.