1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-04-23 01:22:08 +02:00
tldr/pages/common/rustfmt.md
K.B.Dharun Krishna 10bccbd1e4
rust/*: update path, add Tamil translation (#9637)
* rustup: add page

* rustc: add Tamil translation

* rustfmt: add Tamil translation

* rust/* : update path

* rustc: update Tamil translation

* Apply suggestions from code review

Co-authored-by: Jack Lin <blueskyson1401@gmail.com>

Co-authored-by: Jack Lin <blueskyson1401@gmail.com>
2023-01-04 12:27:33 +08:00

458 B

rustfmt

Tool for formatting Rust source code. More information: https://github.com/rust-lang/rustfmt.

  • Format a file, overwriting the original file in-place:

rustfmt {{path/to/source.rs}}

  • Check a file for formatting and display any changes on the console:

rustfmt --check {{path/to/source.rs}}

  • Backup any modified files before formatting (the original file is renamed with a .bk extension):

rustfmt --backup {{path/to/source.rs}}