System Grab Bag

View all TLDR pages from common (or from all pages)

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}}

License and Disclaimer

The content on this page is copyright © 2014—present the tldr-pages team and contributors.
This page is used with permission under Creative Commons Attribution 4.0 International License.

While we do attempt to make sure content is accurate, there isn't a warranty of any kind.