Link Search Menu Expand Document


Tool for formatting Rust source code. More information:

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

rustfmt {{}}

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

rustfmt --check {{}}

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

rustfmt --backup {{}}