From 0648e44fb15f967dcf76332e942d6342d6dcb037 Mon Sep 17 00:00:00 2001 From: Matvej Mamonov Date: Thu, 31 Jul 2025 22:39:53 +0200 Subject: [PATCH 1/2] Remove repetition --- src/appendix-04-useful-development-tools.md | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/src/appendix-04-useful-development-tools.md b/src/appendix-04-useful-development-tools.md index 229ccd09e3..14cccdd9eb 100644 --- a/src/appendix-04-useful-development-tools.md +++ b/src/appendix-04-useful-development-tools.md @@ -13,20 +13,11 @@ style to use when writing Rust: everyone formats their code using the tool. Rust installations include rustfmt by default, so you should already have the programs `rustfmt` and `cargo-fmt` on your system. These two commands are analogous to `rustc` and `cargo` in that `rustfmt` allows finer-grained control -and `cargo-fmt` understands conventions of a project that uses Cargo. To format -any Cargo project, enter the following: +and `cargo-fmt` understands conventions of a project that uses Cargo. -```sh -$ cargo fmt -``` - -Running this command reformats all the Rust code in the current crate. This -should only change the code style, not the code semantics. - -This command gives you `rustfmt` and `cargo-fmt`, similar to how Rust gives you -both `rustc` and `cargo`. To format any Cargo project, enter the following: +To format any Cargo project, enter the following: -```console +```sh $ cargo fmt ``` From 461fda617eb9f22dd7a57f00d87363998f48f986 Mon Sep 17 00:00:00 2001 From: Matvej Mamonov Date: Thu, 31 Jul 2025 22:41:32 +0200 Subject: [PATCH 2/2] Format code block as `console` instead of `sh` --- src/appendix-04-useful-development-tools.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/appendix-04-useful-development-tools.md b/src/appendix-04-useful-development-tools.md index 14cccdd9eb..b9d30a1875 100644 --- a/src/appendix-04-useful-development-tools.md +++ b/src/appendix-04-useful-development-tools.md @@ -17,7 +17,7 @@ and `cargo-fmt` understands conventions of a project that uses Cargo. To format any Cargo project, enter the following: -```sh +```console $ cargo fmt ```