From a62b4a70699e950ed799dd21f09d815314206c27 Mon Sep 17 00:00:00 2001 From: Yuri Astrakhan Date: Tue, 12 Dec 2023 09:57:57 -0500 Subject: [PATCH] Upgrade edition, set categories, MSRV (#37) * 18: Crates tags: added categories; added edition 2018 * wip * Upgrade to edition 2021, set MSRV I used `cargo msrv -- cargo test` tool to find that 1.56.1 is the oldest satisfied MSRV --------- Co-authored-by: Horki --- .github/workflows/rust.yml | 20 +++++++++++++++----- Cargo.toml | 3 +++ 2 files changed, 18 insertions(+), 5 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 4803744..4b1f791 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -11,20 +11,30 @@ env: jobs: build: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Build run: cargo build --verbose - name: Run tests run: cargo test --verbose - fmt: + msrv: runs-on: ubuntu-latest + steps: + - 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 diff --git a/Cargo.toml b/Cargo.toml index f8bd428..1efe41b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -7,6 +7,9 @@ license = "Apache-2.0 OR MIT" readme = "README.md" 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"