From b53105065c4ebf84923edb6591e427c5af372e1d Mon Sep 17 00:00:00 2001 From: Emil Ernerfeldt Date: Mon, 8 Jul 2024 16:31:33 +0200 Subject: [PATCH] Update to Rust 1.76 (#7) --- .github/workflows/integration-ffi.yml | 4 ++-- .github/workflows/test.yml | 10 +++++----- Cargo.toml | 16 +++++++++++++++- rust-toolchain.toml | 2 +- src/array/growable/structure.rs | 2 +- tests/it/ffi/data.rs | 2 +- 6 files changed, 25 insertions(+), 11 deletions(-) diff --git a/.github/workflows/integration-ffi.yml b/.github/workflows/integration-ffi.yml index ccb7c0cba67..9037bd4d64a 100644 --- a/.github/workflows/integration-ffi.yml +++ b/.github/workflows/integration-ffi.yml @@ -10,8 +10,8 @@ jobs: - uses: actions/checkout@v2 - name: Setup Rust toolchain run: | - rustup toolchain install 1.72.1 - rustup default 1.72.1 + rustup toolchain install 1.76.0 + rustup default 1.76.0 rustup component add rustfmt clippy - name: Cache Cargo uses: actions/cache@v2 diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index a2580f5dc18..eb02e158d74 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -10,7 +10,7 @@ jobs: steps: - uses: actions/checkout@v2 - name: Install Rust - run: rustup update 1.72.1 + run: rustup update 1.76.0 - name: Setup parquet files run: | apt update && apt install python3-pip python3-venv -y -q @@ -34,7 +34,7 @@ jobs: steps: - uses: actions/checkout@v2 - name: Install Rust - run: rustup update 1.72.1 + run: rustup update 1.76.0 - uses: Swatinem/rust-cache@v1 - name: Run shell: bash @@ -48,7 +48,7 @@ jobs: steps: - uses: actions/checkout@v2 - name: Install Rust - run: rustup update 1.72.1 + run: rustup update 1.76.0 - uses: Swatinem/rust-cache@v1 - name: Install clippy run: rustup component add clippy @@ -61,7 +61,7 @@ jobs: steps: - uses: actions/checkout@v2 - name: Install Rust - run: rustup update 1.72.1 + run: rustup update 1.76.0 - uses: Swatinem/rust-cache@v1 - name: Install rustfmt run: rustup component add rustfmt @@ -133,7 +133,7 @@ jobs: steps: - uses: actions/checkout@v2 - name: Install Rust - run: rustup update 1.72.1 + run: rustup update 1.76.0 - name: Setup all features run: cargo install cargo-all-features - uses: Swatinem/rust-cache@v1 diff --git a/Cargo.toml b/Cargo.toml index 42a78625e3d..9780e6466e7 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -12,7 +12,7 @@ authors = [ ] keywords = ["arrow", "analytics"] edition = "2021" -rust-version = "1.72" +rust-version = "1.76" exclude = ["testing/"] [lib] @@ -306,6 +306,20 @@ rustc_version = "0.4.0" [package.metadata.cargo-all-features] allowlist = ["compute", "compute_sort", "compute_hash", "compute_nullif"] +# --------------------------------------------------------------------------------- + +[lints.rust] +unused_imports = "allow" + +[lints.clippy] +blocks_in_conditions = "allow" +items_after_test_module = "allow" +manual_hash_one = "allow" +non_canonical_partial_ord_impl = "allow" +redundant_guards = "allow" + +# --------------------------------------------------------------------------------- + [[bench]] name = "take_kernels" harness = false diff --git a/rust-toolchain.toml b/rust-toolchain.toml index 7e8f0a9aabf..83a52c38386 100644 --- a/rust-toolchain.toml +++ b/rust-toolchain.toml @@ -1,2 +1,2 @@ [toolchain] -channel = "1.72" +channel = "1.76" diff --git a/src/array/growable/structure.rs b/src/array/growable/structure.rs index b1242e08a4f..ddf58994226 100644 --- a/src/array/growable/structure.rs +++ b/src/array/growable/structure.rs @@ -109,7 +109,7 @@ impl<'a> Growable<'a> for GrowableStruct<'a> { // All children should have the same indexing, so just use the first // one. If we don't have children, we might still have a validity // array, so use that. - if let Some(child) = self.values.get(0) { + if let Some(child) = self.values.first() { child.len() } else { self.validity.len() diff --git a/tests/it/ffi/data.rs b/tests/it/ffi/data.rs index 31bacb83878..b7f303a9b4c 100644 --- a/tests/it/ffi/data.rs +++ b/tests/it/ffi/data.rs @@ -342,7 +342,7 @@ fn extension() -> Result<()> { DataType::Extension( "a".to_string(), Arc::new(DataType::Int32), - Some("bla".to_string()).map(Arc::new), + Some(Arc::new("bla".to_string())), ), true, );