Closed timongh closed 1 year ago
All style decisions are adapted from Prettier core (typescript), so differences from rustfmt are expected
Note that you can also use prettier in the CLI (requires NodeJS):
npm install --global prettier-plugin-rust prettier
Then instead of cargo fmt
, you can format your project using this command:
prettier --write **/*.rs
https://github.com/jinxdash/prettier-plugin-rust#project-integration
Input code
Output code
Additional context
The results generated by executing
cargo fmt
:use std::io::{stdin, stdout, Write};