Skip to content

Commit

Permalink
Fix inconsistencies in rustfmt editions on CI and local
Browse files Browse the repository at this point in the history
We should be using at least edition 2021 everywhere.

Signed-off-by: clux <[email protected]>
  • Loading branch information
clux committed Nov 22, 2024
1 parent 08ccc47 commit b550c9c
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
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 2018 --check $(find . -type f -iname *.rs)
- run: rustfmt +nightly --edition 2021 --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 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:
commit-message: rustfmt
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
2 changes: 2 additions & 0 deletions rustfmt.toml
Original file line number Diff line number Diff line change
@@ -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"
Expand Down

0 comments on commit b550c9c

Please sign in to comment.