LinuxCommandLibrary

cargo-fmt

Run `rustfmt` on all source files in a Rust project.

TLDR

Format all source files

$ cargo fmt
copy


Check for formatting errors without writing to the files
$ cargo fmt --check
copy


Pass arguments to each rustfmt call
$ cargo fmt -- [rustfmt_args]
copy

Copied to clipboard