Skip to content

Commit 9c70d51

Browse files
committed
Improve wording in error handling guide
The original blog post referred to examples by their file names, and now that it's in guide form, there is no file name. So edit the text so that it makes a bit more sense. Fixes #28428
1 parent 3e6d724 commit 9c70d51

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/doc/trpl/error-handling.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ analysis is the only way to get at the value stored inside an `Option<T>`. This
182182
means that you, as the programmer, must handle the case when an `Option<T>` is
183183
`None` instead of `Some(t)`.
184184

185-
But wait, what about `unwrap` used in [`unwrap-double`](#code-unwrap-double)?
185+
But wait, what about `unwrap`,which we used [`previously`](#code-unwrap-double)?
186186
There was no case analysis there! Instead, the case analysis was put inside the
187187
`unwrap` method for you. You could define it yourself if you want:
188188

@@ -211,7 +211,7 @@ that makes `unwrap` ergonomic to use. Unfortunately, that `panic!` means that
211211

212212
### Composing `Option<T>` values
213213

214-
In [`option-ex-string-find`](#code-option-ex-string-find)
214+
In an [example from before](#code-option-ex-string-find),
215215
we saw how to use `find` to discover the extension in a file name. Of course,
216216
not all file names have a `.` in them, so it's possible that the file name has
217217
no extension. This *possibility of absence* is encoded into the types using

0 commit comments

Comments
 (0)