Rust · Command
cargo fmt
cargo fmt formats the current crate's binary and library Rust files with rustfmt. Because rustfmt is optional and external to Cargo, it may need separate installation.
Last updated
Syntax
cargo fmtIn-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.
SubscribeRelated
cargocargo-fixcargo-clippyCustom subcommands