File tree 3 files changed +4
-4
lines changed
3 files changed +4
-4
lines changed Original file line number Diff line number Diff line change 2
2
3
3
A Rust program is (mostly) made up of a series of statements:
4
4
5
- ```
5
+ ``` rust,editable
6
6
fn main() {
7
7
// statement
8
8
// statement
@@ -13,7 +13,7 @@ fn main() {
13
13
There are a few kinds of statements in Rust. The most common two are declaring
14
14
a variable binding, and using a ` ; ` with an expression:
15
15
16
- ```
16
+ ``` rust,editable
17
17
fn main() {
18
18
// variable binding
19
19
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
108
108
### Activity
109
109
110
110
After 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
112
112
way, the output should be:
113
113
114
114
``` txt
Original file line number Diff line number Diff line change @@ -64,7 +64,7 @@ fn main() {
64
64
65
65
### Activity
66
66
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,
68
68
so that if you switch from printing the debug format ` {:?} ` to the display
69
69
format ` {} ` , you see the following output:
70
70
You can’t perform that action at this time.
0 commit comments