Skip to content

Commit 69b95ca

Browse files
committed
Update Generics to 1.9
- Update the contents. - Change the comment style to use the same style to other pages.
1 parent 32cc4ab commit 69b95ca

File tree

2 files changed

+3
-24
lines changed

2 files changed

+3
-24
lines changed

1.9/ja/book/generics.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ let x: Option<f64> = Some(5);
5454
// found `core::option::Option<_>` (expected f64 but found integral variable)
5555
```
5656

57-
<!-- That doesn’t mean we can’t make `Option<T>`s that hold an `f64`! They just have -->
57+
<!-- That doesn’t mean we can’t make `Option<T>`s that hold an `f64`! They have -->
5858
<!-- to match up: -->
5959
これは `f64` を保持する `Option<T>` が作れないという意味ではありませんからね!
6060
リテラルと宣言の型をぴったり合わせなければなりません。
@@ -157,9 +157,9 @@ let float_origin = Point { x: 0.0, y: 0.0 };
157157
<!-- and we then use `x: T` in the type declaration, too. -->
158158
関数と同様に、 `<T>` がジェネリックパラメータを宣言する場所であり、型宣言において `x: T` を使うのも同じです。
159159

160-
<!-- When you want to add an implementation for the generic `struct`, you just -->
160+
<!-- When you want to add an implementation for the generic `struct`, you -->
161161
<!-- declare the type parameter after the `impl`: -->
162-
ジェネリックな `struct` に実装を追加したい場合、 `impl` の後に型パラメータを宣言するだけです
162+
ジェネリックな `struct` に実装を追加したい場合、 `impl` の後に型パラメータを宣言します
163163

164164
```rust
165165
# struct Point<T> {

diff-1.6.0..1.9.0/src/doc/book/generics.md

Lines changed: 0 additions & 21 deletions
This file was deleted.

0 commit comments

Comments
 (0)