1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-07-03 01:55:23 +02:00

rustfmt: add examples (#16807)

This commit is contained in:
Fazle Arefin 2025-06-10 21:21:40 +10:00 committed by GitHub
parent 5ea5df1cc9
commit ea032f0a48
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -14,3 +14,11 @@
- Backup any modified files before formatting (the original file is renamed with a `.bk` extension):
`rustfmt --backup {{path/to/source.rs}}`
- Format code using a specific Rust style edition (formatting rules) verbosely:
`rustfmt --style-edition {{2015|2018|2021|2024}} {{[-v|--verbose]}} {{path/to/source1.rs path/to/source2.rs ...}}`
- Format code using a specific Rust edition (language features and parsing):
`rustfmt --edition {{2015|2018|2021|2024}} {{path/to/source1.rs path/to/source2.rs ...}}`