Standardize a format for the code so that format on save or commit doesn't ruin the commit. This uses nightly fmt as stable fmt doesn't have that much choice. Just use cargo +nightly fmt or in vscode with rust-analyser just format (Shift + Alt + F). This does require the nightly toolchain for formatting but easily added with rustup install nightly.
Standardize a format for the code so that format on save or commit doesn't ruin the commit. This uses nightly fmt as stable fmt doesn't have that much choice. Just use
cargo +nightly fmt
or in vscode withrust-analyser
just format (Shift + Alt + F
). This does require the nightly toolchain for formatting but easily added withrustup install nightly
.