Skip to content

Latest commit

 

History

History
23 lines (17 loc) · 493 Bytes

rustfmt.md

File metadata and controls

23 lines (17 loc) · 493 Bytes

Description

rustfmt is a tool that checks and reformats code in Rust according to the community code style.


rustfmt commands

Example Explanation
rustup component add rustfmt Adds rustfmt component to the active toolchain.
cargo fmt Runs rustfmt for the current crate.

Examples

PATH_TO_CARGO_TOML="./Cargo.toml"

cargo fmt \
		--all \
		--manifest-path $(PATH_TO_CARGO_TOML) \
		-- --check