mirror of
https://github.com/ivuorinen/cheatsheet-tldr.git
synced 2026-02-03 14:43:35 +00:00
22 lines
419 B
Plaintext
22 lines
419 B
Plaintext
---
|
|
syntax: markdown
|
|
tags: [tldr, common]
|
|
source: https://github.com/tldr-pages/tldr.git
|
|
---
|
|
# 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}}`
|