Skip to content

Commit ff1ed7b

Browse files
committed
Reuse the style edition chapter for rustfmt migration instructions
1 parent d736d66 commit ff1ed7b

File tree

2 files changed

+5
-13
lines changed

2 files changed

+5
-13
lines changed

src/rust-2024/rustfmt-raw-identifier-sorting.md

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -35,16 +35,6 @@ use websocket::result::WebSocketError;
3535

3636
## Migration
3737

38-
The change can be applied automatically by running `cargo fmt` or `rustfmt` with the 2024 Edition.
38+
The change can be applied automatically by running `cargo fmt` or `rustfmt` with the 2024 Edition. See the [Style edition] chapter for more information on migrating and how style editions work.
3939

40-
With a `Cargo.toml` file that has `edition` set to `2024`, run:
41-
42-
```sh
43-
cargo fmt
44-
```
45-
46-
Or run `rustfmt` directly:
47-
48-
```sh
49-
rustfmt foo.rs --style-edition 2024
50-
```
40+
[Style edition]: rustfmt-style-edition.md

src/rust-2024/rustfmt-sorting.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,4 +40,6 @@ use std::num::{NonZeroU8, NonZeroU16, NonZeroU32, NonZeroU64};
4040

4141
## Migration
4242

43-
The change can be applied automatically by running `cargo fmt` or `rustfmt` with the 2024 Edition.
43+
The change can be applied automatically by running `cargo fmt` or `rustfmt` with the 2024 Edition. See the [Style edition] chapter for more information on migrating and how style editions work.
44+
45+
[Style edition]: rustfmt-style-edition.md

0 commit comments

Comments
 (0)