1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-04-23 05:02:10 +02:00
tldr/pages.zh/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

16 lines
448 B
Markdown

# rustfmt
> 格式化 Rust 源代码的工具。
> 更多信息:<https://github.com/rust-lang/rustfmt>.
- 格式化文件,就地覆盖原始文件:
`rustfmt {{路径/到/源文件.rs}}`
- 检查文件的格式并在控制台上显示所有更改:
`rustfmt --check {{路径/到/源文件.rs}}`
- 格式化之前,备份所有修改过的文件(原始文件的扩展名为 `.bk`):
`rustfmt --backup {{路径/到/源文件.rs}}`