Skip to content

Fix typo and improve translation. #52

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 31, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions examples/hello/print/print_display/display.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@ impl fmt::Display for MinMax {

// 比較のため、フィールドに名前をつけれる様な構造体を定義しましょう
#[derive(Debug)]
struct Point2 {
struct Point2D {
x: f64,
y: f64,
}

// 先程と同様にして、Point2用の`Display`を実装しています。
impl fmt::Display for Point2 {
// 先程と同様にして、Point2D用の`Display`を実装しています。
impl fmt::Display for Point2D {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
// `x`と`y`のみが明示的になるようにカスタマイズ
write!(f, "x: {}, y: {}", self.x, self.y)
Expand All @@ -42,7 +42,7 @@ fn main() {
small = small_range,
big = big_range);

let point = Point2 { x: 3.3, y: 7.2 };
let point = Point2D { x: 3.3, y: 7.2 };

println!("Compare points:");
println!("Display: {}", point);
Expand Down
4 changes: 2 additions & 2 deletions examples/hello/print/print_display/input.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,10 @@ impl fmt::Display for Structure {

### 演習

<!--- After checking the output of the above example, use the `Point2` struct as --->
<!--- After checking the output of the above example, use the `Point2D` struct as --->
<!--- guide to add a Complex struct to the example. When printed in the same --->
<!--- way, the output should be: --->
上記の例のアウトプットを確認し、`Point2`構造体を使用して、複素数を格納するための構造体を定義しましょう。うまく行けば以下のように出力されるはずです。
上記の例のアウトプットを確認し、`Point2D`構造体を参考として、複素数を格納するための構造体を定義しましょう。うまく行けば以下のように出力されるはずです。

```
Display: 3.3 + 7.2i
Expand Down
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy