Skip to content

Commit

Permalink
rustfmt: add page (tldr-pages#2318) (tldr-pages#2319)
Browse files Browse the repository at this point in the history
  • Loading branch information
mfrw authored and sbrl committed Sep 11, 2018
1 parent fecba2c commit 61f9589
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions pages/common/rustfmt.md
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}}`

0 comments on commit 61f9589

Please sign in to comment.