Skip to content

Commit 6fb2333

Browse files
author
Toby Scrace
committed
Fix #29542
Reword "Writing the logic" paragraph to prevent `unwrap` being confused for a macro.
1 parent a216e84 commit 6fb2333

File tree

1 file changed

+5
-8
lines changed

1 file changed

+5
-8
lines changed

src/doc/trpl/error-handling.md

+5-8
Original file line numberDiff line numberDiff line change
@@ -1605,14 +1605,11 @@ arguments.
16051605

16061606
## Writing the logic
16071607

1608-
We're all different in how we write code, but error handling is
1609-
usually the last thing we want to think about. This isn't very good
1610-
practice for good design, but it can be useful for rapidly
1611-
prototyping. In our case, because Rust forces us to be explicit about
1612-
error handling, it will also make it obvious what parts of our program
1613-
can cause errors. Why? Because Rust will make us call `unwrap`! This
1614-
can give us a nice bird's eye view of how we need to approach error
1615-
handling.
1608+
We all write code differently, but error handling is usually the last thing we
1609+
want to think about. This isn't great for the overall design of a program, but
1610+
it can be useful for rapid prototyping. Because Rust forces us to be explicit
1611+
about error handling (by making us call `unwrap`), it is easy to see which
1612+
parts of our program can cause errors.
16161613

16171614
In this case study, the logic is really simple. All we need to do is parse the
16181615
CSV data given to us and print out a field in matching rows. Let's do it. (Make

0 commit comments

Comments
 (0)