mirror of
https://github.com/rust-lang/book.git
synced 2026-11-30 20:24:32 -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
|
||||
enum OptionalNumber<T> { enum OptionalFloatingPointNumber<T> {
|
||||
Some(T), Some(T),
|
||||
None, None,
|
||||
} }
|
||||
Some(T), Some(T),
|
||||
None, None,
|
||||
} }
|
||||
```
|
||||
|
||||
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:
|
||||
|
||||
```text
|
||||
enum Option<T> { enum Option<T> {
|
||||
enum Option<T> { enum Option<T> {
|
||||
Some(T), Some(T),
|
||||
None, None,
|
||||
} }
|
||||
|
||||
Reference in New Issue
Block a user