mirror of
https://github.com/rust-lang/book.git
synced 2026-11-30 19:54:34 -06:00
Merge pull request #457 from gypsydave5/patch-2
Link to the section in chapter 2
This commit is contained in:
@@ -6,9 +6,11 @@ interpret and respond to. For example, if we try to open a file and that
|
||||
operation fails because the file doesn’t exist, we might want to create the
|
||||
file instead of terminating the process.
|
||||
|
||||
Recall from Chapter 2 the section on “Handling Potential Failure with the
|
||||
`Result` Type” that the `Result` enum is defined as having two variants, `Ok`
|
||||
and `Err`, as follows:
|
||||
Recall from Chapter 2 the section on “[Handling Potential Failure with the
|
||||
`Result` Type][handle_failure]<!-- ignore -->” that the `Result` enum is defined
|
||||
as having two variants, `Ok` and `Err`, as follows:
|
||||
|
||||
[handle_failure]: ch02-00-guessing-game-tutorial.md#handling-potential-failure-with-the-result-type
|
||||
|
||||
```rust
|
||||
enum Result<T, E> {
|
||||
|
||||
Reference in New Issue
Block a user