From af80a4389c928517824d1dd1f9ac9cf4fcc218c1 Mon Sep 17 00:00:00 2001 From: Koichi ITO Date: Wed, 13 Apr 2022 23:12:47 +0900 Subject: [PATCH] Update paragraph about rustfmt in Chapter 1.2 Follow up https://github.com/rust-lang/book/pull/2304. --- src/ch01-02-hello-world.md | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/src/ch01-02-hello-world.md b/src/ch01-02-hello-world.md index 91e5a147a..598d74138 100644 --- a/src/ch01-02-hello-world.md +++ b/src/ch01-02-hello-world.md @@ -219,18 +219,16 @@ between. スペースを1つあけて、開き波括弧を関数宣言と同じ行に配置するのがいいスタイルです。 - -これを執筆している時点では、`rustfmt`と呼ばれる自動整形ツールは開発中です。複数のRustプロジェクトに渡って、 -標準的なスタイルに固執したいなら、`rustfmt`は特定のスタイルにコードを整形してくれます。Rustチームは、 -最終的に`rustc`のように標準的なRustの配布にこのツールを含むことを計画しています。従って、この本を読んだ時期によっては、 -既にコンピュータにインストールされている可能性もあります!詳細は、オンラインのドキュメンテーションを確認してください。 +If you want to stick to a standard style across Rust projects, you can use an +automatic formatter tool called `rustfmt` to format your code in a particular +style. The Rust team has included this tool with the standard Rust distribution, +like `rustc`, so it should already be installed on your computer! Check the +online documentation for more details. +--> + +複数のRustプロジェクトに渡って標準的なスタイルにこだわりたいなら、`rustfmt`を使うことでコードを決まったスタイルに整形できるでしょう。 +Rustチームは、`rustc`のように標準的なRustの配布にこのツールを含んでいるため、既にコンピューターにインストールされているはずです! +詳細は、オンラインのドキュメンテーションを確認してください。