Skip to content

Commit f829a7a

Browse files
tottotoseanmonstar
authored andcommitted
chore(ci): set rustfmt edition to 2021
1 parent 724bde7 commit f829a7a

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

.github/workflows/CI.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,8 @@ jobs:
4545

4646
- name: cargo fmt --check
4747
run: |
48-
if ! rustfmt --check --edition 2018 $(git ls-files '*.rs'); then
49-
printf "Please run \`rustfmt --edition 2018 \$(git ls-files '*.rs')\` to fix rustfmt errors.\nSee CONTRIBUTING.md for more details.\n" >&2
48+
if ! rustfmt --check --edition 2021 $(git ls-files '*.rs'); then
49+
printf "Please run \`rustfmt --edition 2021 \$(git ls-files '*.rs')\` to fix rustfmt errors.\nSee CONTRIBUTING.md for more details.\n" >&2
5050
exit 1
5151
fi
5252

docs/CODE_STYLE.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@ hyper uses the default configuration of `rustfmt`.
88

99
```txt
1010
# Mac or Linux
11-
rustfmt --check --edition 2018 $(git ls-files '*.rs')
11+
rustfmt --check --edition 2021 $(git ls-files '*.rs')
1212
1313
# Powershell
14-
Get-ChildItem . -Filter "*.rs" -Recurse | foreach { rustfmt --check --edition 2018 $_.FullName }
14+
Get-ChildItem . -Filter "*.rs" -Recurse | foreach { rustfmt --check --edition 2021 $_.FullName }
1515
```
1616

1717
> **NOTE**: If you are using `rust-analyzer`, you can add the following two lines in your `settings.json` to make sure the features get taken into account when checking the project:

0 commit comments

Comments
 (0)