File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 22
33A Rust program is (mostly) made up of a series of statements:
44
5- ```
5+ ``` rust,editable
66fn main() {
77 // statement
88 // statement
@@ -13,7 +13,7 @@ fn main() {
1313There are a few kinds of statements in Rust. The most common two are declaring
1414a variable binding, and using a ` ; ` with an expression:
1515
16- ```
16+ ``` rust,editable
1717fn main() {
1818 // variable binding
1919 let x = 5;
Original file line number Diff line number Diff line change @@ -108,7 +108,7 @@ each requires its own implementation. This is detailed further in
108108### Activity
109109
110110After checking the output of the above example, use the ` Point2D ` struct as a
111- guide to add a Complex struct to the example. When printed in the same
111+ guide to add a ` Complex ` struct to the example. When printed in the same
112112way, the output should be:
113113
114114``` txt
Original file line number Diff line number Diff line change @@ -64,7 +64,7 @@ fn main() {
6464
6565### Activity
6666
67- 1 . * Recap* : Add the ` fmt::Display ` trait to the Matrix ` struct ` in the above example,
67+ 1 . * Recap* : Add the ` fmt::Display ` trait to the ` Matrix ` struct in the above example,
6868 so that if you switch from printing the debug format ` {:?} ` to the display
6969 format ` {} ` , you see the following output:
7070
You can’t perform that action at this time.
0 commit comments