diff --git a/training-slides/src/compound-types.md b/training-slides/src/compound-types.md index 77fc86a3..44fcbf76 100644 --- a/training-slides/src/compound-types.md +++ b/training-slides/src/compound-types.md @@ -15,7 +15,7 @@ struct Point { ## Construction -- there is no partial initialization +- there is no partial initialization ```rust [1-4|6-8] struct Point { @@ -30,7 +30,7 @@ fn main() { ## Construction -- but you can copy from an existing variable of the same type +- but you can copy from an existing variable of the same type ```rust [8] struct Point { @@ -61,8 +61,8 @@ fn main() { ## Tuples -- Holds values of different types together. -- Like an anonymous `struct`, with fields numbered 0, 1, etc. +- Holds values of different types together. +- Like an anonymous `struct`, with fields numbered 0, 1, etc. ```rust [2|3-4] fn main() { @@ -74,9 +74,9 @@ fn main() { ## `()` -- the *empty tuple* -- represents the absence of data -- we often use this similarly to how you’d use `void` in C +- the *empty tuple* +- represents the absence of data +- we often use this similarly to how you’d use `void` in C ```rust fn prints_but_returns_nothing(data: &str) -> () { @@ -86,7 +86,7 @@ fn prints_but_returns_nothing(data: &str) -> () { ## Tuple Structs -- Like a `struct`, with fields numbered 0, 1, etc. +- Like a `struct`, with fields numbered 0, 1, etc. ```rust [1|4|5-6] struct Point(i32,i32); @@ -100,8 +100,8 @@ fn main() { ## Enums -- An `enum` represents different variations of the same subject. -- The different choices in an enum are called *variants* +- An `enum` represents different variations of the same subject. +- The different choices in an enum are called *variants*