Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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/

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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)
4 changes: 2 additions & 2 deletions .github/workflows/rustfmt.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,15 @@ 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:
commit-message: rustfmt
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
6 changes: 3 additions & 3 deletions justfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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")

Expand Down Expand Up @@ -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

Expand Down
14 changes: 8 additions & 6 deletions kube-core/src/schema.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
///
Expand Down Expand Up @@ -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()
);
}
}
}
Expand Down
Loading