From 8803f7ba8ddc6135caae62ba8b006272b7e79fa6 Mon Sep 17 00:00:00 2001 From: Flex Zhong Date: Tue, 29 Sep 2020 18:56:45 +0800 Subject: [PATCH] Create rustfmt.md (#4369) --- pages.zh/common/rustfmt.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 pages.zh/common/rustfmt.md diff --git a/pages.zh/common/rustfmt.md b/pages.zh/common/rustfmt.md new file mode 100644 index 000000000..157325fa5 --- /dev/null +++ b/pages.zh/common/rustfmt.md @@ -0,0 +1,16 @@ +# rustfmt + +> 格式化 Rust 源代码的工具. +> 更多信息: . + +- 格式化文件,就地覆盖原始文件: + +`rustfmt {{source.rs}}` + +- 检查文件的格式并在控制台上显示所有更改: + +`rustfmt --check {{source.rs}}` + +- 格式化之前,备份所有修改过的文件(原始文件的扩展名为 `.bk`): + +`rustfmt --backup {{source.rs}}`