From 7129d5ab15c5b293cfeb439a0d41e116988edcc2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20Gardstr=C3=B6m?= Date: Wed, 1 May 2024 00:56:46 +0200 Subject: [PATCH] bump msrv --- .changes/1038-1220-1482.json | 6 ++++++ .changes/1038-1220.json | 6 ------ .github/workflows/ci.yml | 2 +- Cargo.toml | 2 +- README.md | 10 +++++----- clippy.toml | 2 +- src/config.rs | 4 ++-- 7 files changed, 16 insertions(+), 16 deletions(-) create mode 100644 .changes/1038-1220-1482.json delete mode 100644 .changes/1038-1220.json diff --git a/.changes/1038-1220-1482.json b/.changes/1038-1220-1482.json new file mode 100644 index 000000000..0a59298a8 --- /dev/null +++ b/.changes/1038-1220-1482.json @@ -0,0 +1,6 @@ +[ + { + "description": "bump MSRV to 1.77.2", + "type": "internal" + } +] diff --git a/.changes/1038-1220.json b/.changes/1038-1220.json deleted file mode 100644 index e7f603dd5..000000000 --- a/.changes/1038-1220.json +++ /dev/null @@ -1,6 +0,0 @@ -[ - { - "description": "bump MSRV to 1.64", - "type": "internal" - } -] diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9e61d2497..f754a676b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -71,7 +71,7 @@ jobs: - uses: ./.github/actions/setup-rust with: components: clippy - toolchain: 1.64.0 # MSRV, Minimally Supported Rust Version. Make sure to update README.md and clippy.toml + toolchain: 1.77.2 # MSRV, Minimally Supported Rust Version. Make sure to update README.md and clippy.toml - name: Run clippy run: cargo clippy --locked --all-targets --all-features --workspace -- -D warnings test: diff --git a/Cargo.toml b/Cargo.toml index baa1ea0d2..d87376ffb 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -17,7 +17,7 @@ include = [ "README.md", "assets/*", ] -rust-version = "1.64" +rust-version = "1.77.2" [features] default = [] diff --git a/README.md b/README.md index 60fa68ca6..5201aa9ac 100644 --- a/README.md +++ b/README.md @@ -102,7 +102,7 @@ config snippet would look like this: [workspace.metadata.cross.target.aarch64-unknown-linux-gnu] # Install libssl-dev:arm64, see pre-build = [ - "dpkg --add-architecture $CROSS_DEB_ARCH", + "dpkg --add-architecture $CROSS_DEB_ARCH", "apt-get update && apt-get --assume-yes install libssl-dev:$CROSS_DEB_ARCH" ] [workspace.metadata.cross.target.armv7-unknown-linux-gnueabi] @@ -125,7 +125,7 @@ it should search for the config file. This way you are not limited to a #### Option 4: Configuring `cross` through environment variables Besides the TOML-based configuration files, config can be passed through -[environment variables][docs_env_vars], too. +[environment variables][docs_env_vars], too. ### Docker in Docker @@ -275,14 +275,14 @@ terminate. [4] libc = newlib -[5] Must change +[5] Must change `image = "ghcr.io/cross-rs/x86_64-unknown-linux-gnu:main-centos"` in `Cross.toml` for `[target.x86_64-unknown-linux-gnu]` to use the CentOS7-compatible target. [6] libc = emscripten and GCC = clang -[7] Must change +[7] Must change `image = "ghcr.io/cross-rs/aarch64-unknown-linux-gnu:main-centos"` in `Cross.toml` for `[target.aarch64-unknown-linux-gnu]` to use the CentOS7-compatible target. @@ -318,7 +318,7 @@ $ QEMU_STRACE=1 cross run --target aarch64-unknown-linux-gnu ## Minimum Supported Rust Version (MSRV) -This crate is guaranteed to compile on stable Rust 1.64.0 and up. It *might* +This crate is guaranteed to compile on stable Rust 1.77.2 and up. It *might* compile with older versions but that may change in any new patch release. Some cross-compilation targets require a later Rust version, and using Xargo diff --git a/clippy.toml b/clippy.toml index 00fd94a2b..fe7b17498 100644 --- a/clippy.toml +++ b/clippy.toml @@ -2,4 +2,4 @@ disallowed-methods = [ { path = "std::path::Path::display", reason = "incorrect handling of non-Unicode paths, use path.to_utf8() or debug (`{path:?}`) instead" }, ] allow-unwrap-in-tests = true -msrv = "1.64.0" +msrv = "1.77.2" diff --git a/src/config.rs b/src/config.rs index 6b7ab8cdb..7fd4d73bd 100644 --- a/src/config.rs +++ b/src/config.rs @@ -763,7 +763,7 @@ mod tests { map.insert("CROSS_BUILD_ENV_VOLUMES", "VOLUME1 VOLUME2"); let env = Environment::new(Some(map)); let config = Config::new_with(Some(toml(TOML_BUILD_VOLUMES)?), env); - let expected = vec![s!("VOLUME1"), s!("VOLUME2")]; + let expected = [s!("VOLUME1"), s!("VOLUME2")]; let result = config.env_volumes(&target()).unwrap().unwrap_or_default(); dbg!(&result); @@ -779,7 +779,7 @@ mod tests { let map = HashMap::new(); let env = Environment::new(Some(map)); let config = Config::new_with(Some(toml(TOML_BUILD_VOLUMES)?), env); - let expected = vec![s!("VOLUME3"), s!("VOLUME4")]; + let expected = [s!("VOLUME3"), s!("VOLUME4")]; let result = config.env_volumes(&target()).unwrap().unwrap_or_default(); dbg!(&result);