mirror of
https://github.com/rust-lang/book.git
synced 2026-11-30 22:01:18 -06:00
Merge remote-tracking branch 'origin/pr/352'
This commit is contained in:
@@ -104,9 +104,9 @@ parameter. The syntax to do that is the angle brackets, like this:
|
|||||||
|
|
||||||
```text
|
```text
|
||||||
enum OptionalNumber<T> { enum OptionalFloatingPointNumber<T> {
|
enum OptionalNumber<T> { enum OptionalFloatingPointNumber<T> {
|
||||||
Some(T), Some(T),
|
Some(T), Some(T),
|
||||||
None, None,
|
None, None,
|
||||||
} }
|
} }
|
||||||
```
|
```
|
||||||
|
|
||||||
The `<>`s after the enum name indicate a list of type parameters, just like
|
The `<>`s after the enum name indicate a list of type parameters, just like
|
||||||
@@ -116,7 +116,7 @@ they're not specific to integers or floating point numbers anymore, so they can
|
|||||||
have the same name:
|
have the same name:
|
||||||
|
|
||||||
```text
|
```text
|
||||||
enum Option<T> { enum Option<T> {
|
enum Option<T> { enum Option<T> {
|
||||||
Some(T), Some(T),
|
Some(T), Some(T),
|
||||||
None, None,
|
None, None,
|
||||||
} }
|
} }
|
||||||
|
|||||||
Reference in New Issue
Block a user