From 350fe0fd47b336937e6465717bae8cdd7b745af9 Mon Sep 17 00:00:00 2001 From: Rain Date: Sun, 19 Mar 2023 14:40:22 -0700 Subject: [PATCH 1/2] update Rust edition to 2021 unarray uses an API that requires Rust 1.60, so we can go ahead and update the Rust edition to 2021. --- Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index 0376e0e..658ee6c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -4,7 +4,7 @@ description = "Utilities for working with uninitialized arrays" repository = "https://github.com/cameron1024/unarray" license = "MIT OR Apache-2.0" version = "0.1.4" -edition = "2018" +edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html From 965cf7fd35f76865153d7ef61a9cad81ba9cd081 Mon Sep 17 00:00:00 2001 From: Rain Date: Sun, 19 Mar 2023 14:42:51 -0700 Subject: [PATCH 2/2] add Rust 1.60 as the MSRV to Cargo.toml Currently, this crate does not indicate an MSRV but uses an API, `MaybeUninit::assume_init_drop`, that was added with Rust 1.60. Indicate that this crate is compatible with Rust 1.60 and above. Also add CI against the MSRV. --- .github/workflows/rust.yml | 6 ++++++ Cargo.toml | 1 + 2 files changed, 7 insertions(+) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index b887495..3891554 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -13,9 +13,15 @@ jobs: build: runs-on: ubuntu-latest + matrix: + # The MSRV is Rust 1.60. + rust-toolchain: [1.60, stable] steps: - uses: actions/checkout@v3 + - uses: dtolnay/rust-toolchain@v1 + with: + toolchain: ${{ matrix.rust-toolchain }} - name: Build run: cargo build --verbose - name: Run tests diff --git a/Cargo.toml b/Cargo.toml index 658ee6c..fffe151 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -5,6 +5,7 @@ repository = "https://github.com/cameron1024/unarray" license = "MIT OR Apache-2.0" version = "0.1.4" edition = "2021" +rust-version = "1.60" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html