We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3a84ea0 commit ee2dc35Copy full SHA for ee2dc35
1 file changed
.github/workflows/regenerate.yml
@@ -98,7 +98,13 @@ jobs:
98
# ergonomic layer is left to its own formatting (and is ignore-protected
99
# from the generator anyway).
100
- name: Format generated code
101
- run: find src/apis src/models -name '*.rs' -print0 | xargs -0 rustfmt --edition 2021
+ run: |
102
+ # Derive the edition from Cargo.toml so it can't drift from the crate
103
+ # if the edition is ever bumped (same source as the version bump above).
104
+ edition=$(cargo metadata --no-deps --format-version 1 \
105
+ | jq -r '.packages[] | select(.name=="hotdata") | .edition')
106
+ find src/apis src/models -name '*.rs' -print0 \
107
+ | xargs -0 rustfmt --edition "$edition"
108
109
- name: Clean up fetched spec
110
run: rm -f openapi.yaml
0 commit comments