Skip to content

Commit 5d740c9

Browse files
authored
Update exercise to be clearer (#1573)
1 parent af111ee commit 5d740c9

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/hello/print.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,8 @@ fn main() {
6161
6262
// This will not compile because `Structure` does not implement
6363
// fmt::Display
64-
println!("This struct `{}` won't print...", Structure(3));
65-
// FIXME ^ Comment out this line.
64+
//println!("This struct `{}` won't print...", Structure(3));
65+
// TODO ^ Try uncommenting this line
6666
6767
// For Rust 1.58 and above, you can directly capture the argument from a
6868
// surrounding variable. Just like the above, this will output
@@ -88,8 +88,9 @@ Implementing the `fmt::Display` trait automatically implements the
8888

8989
### Activities
9090

91-
* Fix the two issues in the above code (see FIXME) so that it runs without
91+
* Fix the issue in the above code (see FIXME) so that it runs without
9292
error.
93+
* Try uncommenting the line that attempts to format the `Structure` struct (see TODO)
9394
* Add a `println!` macro call that prints: `Pi is roughly 3.142` by controlling
9495
the number of decimal places shown. For the purposes of this exercise,
9596
use `let pi = 3.141592` as an estimate for pi. (Hint: you may need to

0 commit comments

Comments
 (0)