diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9c7a9469b..87f826fff 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -252,7 +252,7 @@ jobs: --mount type=bind,source=${{ github.workspace }},target=/volume \ --mount type=bind,source=$HOME/.cargo/registry,target=/root/.cargo/registry \ --mount type=bind,source=$HOME/.cargo/git,target=/root/.cargo/git \ - clux/muslrust:1.86.0-stable \ + clux/muslrust:1.91.0-stable \ cargo build -p e2e --release --bin=job --features=latest,${{matrix.tls}} -v cp target/x86_64-unknown-linux-musl/release/job e2e/ diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index ee27dcd04..131fcb899 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -33,4 +33,4 @@ jobs: - uses: dtolnay/rust-toolchain@nightly with: components: rustfmt - - run: rustfmt +nightly --edition 2021 --check $(find . -type f -iname *.rs) + - run: rustfmt +nightly --edition 2024 --check $(find . -type f -iname *.rs) diff --git a/.github/workflows/rustfmt.yml b/.github/workflows/rustfmt.yml index 2b6db5d4b..2b701940e 100644 --- a/.github/workflows/rustfmt.yml +++ b/.github/workflows/rustfmt.yml @@ -17,7 +17,7 @@ jobs: - uses: dtolnay/rust-toolchain@nightly with: components: rustfmt - - run: rustfmt +nightly --edition 2021 $(find . -type f -iname *.rs) + - run: rustfmt +nightly --edition 2024 $(find . -type f -iname *.rs) - name: Create Pull Request uses: peter-evans/create-pull-request@v7 with: @@ -25,7 +25,7 @@ jobs: signoff: true title: rustfmt body: | - Changes from `rustfmt +nightly --edition 2021 $(find . -type f -iname *.rs)`. + Changes from `rustfmt +nightly --edition 2024 $(find . -type f -iname *.rs)`. branch: rustfmt # Delete branch when merged delete-branch: true diff --git a/justfile b/justfile index 5a34cca1e..9c9bc8dec 100644 --- a/justfile +++ b/justfile @@ -12,7 +12,7 @@ clippy: fmt: #rustup component add rustfmt --toolchain nightly - rustfmt +nightly --edition 2021 $(find . -type f -iname *.rs) + rustfmt +nightly --edition 2024 $(find . -type f -iname *.rs) doc: RUSTDOCFLAGS="--cfg docsrs" cargo +nightly doc --all-features --no-deps --open @@ -61,7 +61,7 @@ hack: # Skipped oauth and oidc, as these compile fails without a tls stack. readme: - rustdoc README.md --test --edition=2021 + rustdoc README.md --test --edition=2024 e2e: (e2e-mink8s) (e2e-incluster "rustls,latest") @@ -89,7 +89,7 @@ e2e-job-musl features: docker run \ -v cargo-cache:/root/.cargo/registry \ -v "$PWD:/volume" -w /volume \ - --rm -it clux/muslrust:1.86.0-stable cargo build --release --features={{features}} -p e2e + --rm -it clux/muslrust:1.91.0-stable cargo build --release --features={{features}} -p e2e cp target/x86_64-unknown-linux-musl/release/job e2e/job chmod +x e2e/job diff --git a/kube-core/src/schema.rs b/kube-core/src/schema.rs index 479918a8e..51dbeeaf2 100644 --- a/kube-core/src/schema.rs +++ b/kube-core/src/schema.rs @@ -5,10 +5,10 @@ // Used in docs #[allow(unused_imports)] use schemars::generate::SchemaSettings; -use schemars::{transform::Transform, JsonSchema}; +use schemars::{JsonSchema, transform::Transform}; use serde::{Deserialize, Serialize}; use serde_json::Value; -use std::collections::{btree_map::Entry, BTreeMap, BTreeSet}; +use std::collections::{BTreeMap, BTreeSet, btree_map::Entry}; /// schemars [`Visitor`] that rewrites a [`Schema`] to conform to Kubernetes' "structural schema" rules /// @@ -381,10 +381,12 @@ fn hoist_subschema_properties( } Entry::Occupied(entry) => { if &property != entry.get() { - panic!("Property {:?} has the schema {:?} but was already defined as {:?} in another subschema. The schemas for a property used in multiple subschemas must be identical", - entry.key(), - &property, - entry.get()); + panic!( + "Property {:?} has the schema {:?} but was already defined as {:?} in another subschema. The schemas for a property used in multiple subschemas must be identical", + entry.key(), + &property, + entry.get() + ); } } }