forked from tldr-pages/tldr
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
rustfmt: add page (tldr-pages#2318) (tldr-pages#2319)
- Loading branch information
Showing
1 changed file
with
15 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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}}` |