File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ enum Option<T> {
1717```
1818
1919The ` <T> ` part, which you’ve seen a few times before, indicates that this is
20- a generic data type. Inside the declaration of our enum, wherever we see a ` T ` ,
20+ a generic data type. Inside the declaration of our ` enum ` , wherever we see a ` T ` ,
2121we substitute that type for the same type used in the generic. Here’s an
2222example of using ` Option<T> ` , with some extra type annotations:
2323
@@ -115,10 +115,10 @@ let int_origin = Point { x: 0, y: 0 };
115115let float_origin = Point { x : 0.0 , y : 0.0 };
116116```
117117
118- Similarly to functions, the ` <T> ` is where we declare the generic parameters,
118+ Similar to functions, the ` <T> ` is where we declare the generic parameters,
119119and we then use ` x: T ` in the type declaration, too.
120120
121- When you want to add an implementation for the generic struct, you just
121+ When you want to add an implementation for the generic ` struct ` , you just
122122declare the type parameter after the ` impl ` :
123123
124124``` rust
You can’t perform that action at this time.
0 commit comments