From fa7b7f24e15191e4c910d95f1f6967c013455495 Mon Sep 17 00:00:00 2001 From: Eirik A Date: Fri, 22 Nov 2024 03:53:55 +0000 Subject: [PATCH] Fix inconsistencies in rustfmt editions on CI and local (#1646) * Fix inconsistencies in rustfmt editions on CI and local We should be using at least edition 2021 everywhere. Signed-off-by: clux * add unfixable deny bans Signed-off-by: clux --------- Signed-off-by: clux --- .github/workflows/lint.yml | 2 +- .github/workflows/rustfmt.yml | 4 ++-- deny.toml | 6 ++++++ rustfmt.toml | 2 ++ 4 files changed, 11 insertions(+), 3 deletions(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 5843e63f6..230078a83 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 2018 --check $(find . -type f -iname *.rs) + - run: rustfmt +nightly --edition 2021 --check $(find . -type f -iname *.rs) diff --git a/.github/workflows/rustfmt.yml b/.github/workflows/rustfmt.yml index aca386a00..4e2f14e1d 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 2018 $(find . -type f -iname *.rs) + - run: rustfmt +nightly --edition 2021 $(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 2018 $(find . -type f -iname *.rs)`. + Changes from `rustfmt +nightly --edition 2021 $(find . -type f -iname *.rs)`. branch: rustfmt # Delete branch when merged delete-branch: true diff --git a/deny.toml b/deny.toml index 580be6cb1..2f1704961 100644 --- a/deny.toml +++ b/deny.toml @@ -91,3 +91,9 @@ name = "miniz_oxide" name = "thiserror" [[bans.skip]] name = "thiserror-impl" + +# 2 deps from 2 different version of rustls-native-certs not fully upgradeable yet +[[bans.skip]] +name = "security-framework" +[[bans.skip]] +name = "core-foundation" diff --git a/rustfmt.toml b/rustfmt.toml index 0efbfe09e..77b5e1e80 100644 --- a/rustfmt.toml +++ b/rustfmt.toml @@ -1,3 +1,5 @@ +# https://github.com/kube-rs/kube/issues/707 +unstable_features = true overflow_delimited_expr = true newline_style = "Unix" imports_granularity = "Crate"