1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-04-29 23:24:55 +02:00
tldr/pages/common/cargo-fmt.md
Lena ffab1fa468
cargo-{clean,fmt}: add page (#10770)
* cargo clean: add page

* cargo fmt: add page
2023-10-01 16:47:34 +08:00

326 B

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}}