diff --git a/nostarch/appendix.md b/nostarch/appendix.md index bf1e0fa22..e8f1f3a66 100644 --- a/nostarch/appendix.md +++ b/nostarch/appendix.md @@ -533,7 +533,7 @@ The `Default` trait is required when you use the method `unwrap_or_default` on `unwrap_or_default` will return the result of `Default::default` for the type `T` stored in the `Option`. -## Appendix D - Useful Development Tools +## Appendix D: Useful Development Tools In this appendix, we talk about some useful development tools that the Rust project provides. We’ll look at automatic formatting, quick ways to apply @@ -543,11 +543,11 @@ warning fixes, a linter, and integrating with IDEs. The `rustfmt` tool reformats your code according to the community code style. Many collaborative projects use `rustfmt` to prevent arguments about which -style to use when writing Rust: everyone formats their code using the tool. +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 +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: @@ -561,10 +561,10 @@ on `rustfmt`, see its documentation at *https://github.com/rust-lang/rustfmt*. ### Fix Your Code with rustfix -The `rustfix` tool is included with Rust installations and can automatically fix -compiler warnings that have a clear way to correct the problem that’s likely -what you want. You’ve probably seen compiler warnings before. For example, -consider this code: +The `rustfix` tool is included with Rust installations and can automatically +fix compiler warnings that have a clear way to correct the problem that’s +likely what you want. You’ve probably seen compiler warnings before. For +example, consider this code: Filename: src/main.rs @@ -617,13 +617,13 @@ fn main() { The variable `x` is now immutable, and the warning no longer appears. You can also use the `cargo fix` command to transition your code between -different Rust editions. Editions are covered in Appendix E at *appendix-05-editions.md*. +different Rust editions. Editions are covered in Appendix E. ### More Lints with Clippy -The Clippy tool is a collection of lints to analyze your code so you can catch -common mistakes and improve your Rust code. Clippy is included with standard -Rust installations. +The Clippy tool is a collection of lints to analyze your code so that you can +catch common mistakes and improve your Rust code. Clippy is included with +standard Rust installations. To run Clippy’s lints on any Cargo project, enter the following: diff --git a/nostarch/appendix_d.md b/nostarch/appendix_d.md index 18e6094cb..48a5fa33d 100644 --- a/nostarch/appendix_d.md +++ b/nostarch/appendix_d.md @@ -16,11 +16,11 @@ warning fixes, a linter, and integrating with IDEs. The `rustfmt` tool reformats your code according to the community code style. Many collaborative projects use `rustfmt` to prevent arguments about which -style to use when writing Rust: everyone formats their code using the tool. +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 +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: @@ -95,9 +95,9 @@ different Rust editions. Editions are covered in Appendix E. ## More Lints with Clippy -The Clippy tool is a collection of lints to analyze your code so you can catch -common mistakes and improve your Rust code. Clippy is included with standard -Rust installations. +The Clippy tool is a collection of lints to analyze your code so that you can +catch common mistakes and improve your Rust code. Clippy is included with +standard Rust installations. To run Clippy’s lints on any Cargo project, enter the following: diff --git a/src/appendix-04-useful-development-tools.md b/src/appendix-04-useful-development-tools.md index 02dd6490c..6719eaa26 100644 --- a/src/appendix-04-useful-development-tools.md +++ b/src/appendix-04-useful-development-tools.md @@ -1,4 +1,4 @@ -## Appendix D - Useful Development Tools +## Appendix D: Useful Development Tools In this appendix, we talk about some useful development tools that the Rust project provides. We’ll look at automatic formatting, quick ways to apply @@ -8,11 +8,11 @@ warning fixes, a linter, and integrating with IDEs. The `rustfmt` tool reformats your code according to the community code style. Many collaborative projects use `rustfmt` to prevent arguments about which -style to use when writing Rust: everyone formats their code using the tool. +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 +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: @@ -26,10 +26,10 @@ on `rustfmt`, see [its documentation][rustfmt]. ### Fix Your Code with `rustfix` -The `rustfix` tool is included with Rust installations and can automatically fix -compiler warnings that have a clear way to correct the problem that’s likely -what you want. You’ve probably seen compiler warnings before. For example, -consider this code: +The `rustfix` tool is included with Rust installations and can automatically +fix compiler warnings that have a clear way to correct the problem that’s +likely what you want. You’ve probably seen compiler warnings before. For +example, consider this code: Filename: src/main.rs @@ -83,13 +83,14 @@ fn main() { The variable `x` is now immutable, and the warning no longer appears. You can also use the `cargo fix` command to transition your code between -different Rust editions. Editions are covered in [Appendix E][editions]. +different Rust editions. Editions are covered in [Appendix E][editions]. ### More Lints with Clippy -The Clippy tool is a collection of lints to analyze your code so you can catch -common mistakes and improve your Rust code. Clippy is included with standard -Rust installations. +The Clippy tool is a collection of lints to analyze your code so that you can +catch common mistakes and improve your Rust code. Clippy is included with +standard Rust installations. To run Clippy’s lints on any Cargo project, enter the following: