cargo-{clean,fmt}: add page (#10770)
* cargo clean: add page * cargo fmt: add page
This commit is contained in:
16
pages/common/cargo-fmt.md
Normal file
16
pages/common/cargo-fmt.md
Normal 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}}`
|
Reference in New Issue
Block a user