cargo-{clean,fmt}: add page (#10770)

* cargo clean: add page

* cargo fmt: add page
This commit is contained in:
Lena
2023-10-01 10:47:34 +02:00
committed by GitHub
parent 7113ea246c
commit ffab1fa468
2 changed files with 36 additions and 0 deletions

16
pages/common/cargo-fmt.md Normal file
View File

@@ -0,0 +1,16 @@
# cargo fmt
> Run `rustfmt` on all source files in a Rust project.
> More information: <https://github.com/rust-lang/rustfmt>.
- Format all source files:
`cargo fmt`
- Check for formatting errors without writing to the files:
`cargo fmt --check`
- Pass arguments to each `rustfmt` call:
`cargo fmt -- {{rustfmt_args}}`