1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2024-10-30 04:17:58 +01:00

rustfmt: add page (#2318) (#2319)

This commit is contained in:
Muhammad Falak R Wani 2018-09-11 23:34:32 +05:30 committed by Starbeamrainbowlabs
parent fecba2cd70
commit 61f9589496

15
pages/common/rustfmt.md Normal file
View file

@ -0,0 +1,15 @@
# rustfmt
> Tool for formatting Rust source code.
- Format a file, overwriting the original file in-place:
`rustfmt {{source.rs}}`
- Check a file for formatting and display any changes on the console:
`rustfmt --check {{source.rs}}`
- Backup any modified files before formatting (the original file is renamed with a `.bk` extension):
`rustfmt --backup {{source.rs}}`