From d672ad6ffe99b773d82586dd4e9ca4b6b7a7fe0a Mon Sep 17 00:00:00 2001 From: David Wickes Date: Mon, 20 Feb 2017 21:25:48 +0000 Subject: [PATCH 1/3] Link to the section in chapter 2 --- src/ch09-02-recoverable-errors-with-result.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/ch09-02-recoverable-errors-with-result.md b/src/ch09-02-recoverable-errors-with-result.md index 818d74972..c35738041 100644 --- a/src/ch09-02-recoverable-errors-with-result.md +++ b/src/ch09-02-recoverable-errors-with-result.md @@ -6,10 +6,12 @@ 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` +Recall from Chapter 2 the section on “[Handling Potential Failure with the +`Result` Type][handlefailure]” that the `Result` enum is defined as having two variants, `Ok` and `Err`, as follows: +[handlefailure]: ch02-00-guessing-game-tutorial.md#handling-potential-failure-with-the-result-type + ```rust enum Result { Ok(T), From a5195ca2394d9a6ee74419ff0424eba41b343ed1 Mon Sep 17 00:00:00 2001 From: David Wickes Date: Mon, 20 Feb 2017 21:46:20 +0000 Subject: [PATCH 2/3] need to ignore the link in print --- src/ch09-02-recoverable-errors-with-result.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ch09-02-recoverable-errors-with-result.md b/src/ch09-02-recoverable-errors-with-result.md index c35738041..edc597a0b 100644 --- a/src/ch09-02-recoverable-errors-with-result.md +++ b/src/ch09-02-recoverable-errors-with-result.md @@ -7,10 +7,10 @@ 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][handlefailure]” that the `Result` enum is defined as having two variants, `Ok` +`Result` Type][handle_failure]” that the `Result` enum is defined as having two variants, `Ok` and `Err`, as follows: -[handlefailure]: ch02-00-guessing-game-tutorial.md#handling-potential-failure-with-the-result-type +[handle_failure]: ch02-00-guessing-game-tutorial.md#handling-potential-failure-with-the-result-type ```rust enum Result { From 912a3890f2cdb9a71ed7b2a6aba4f01c1f3c399a Mon Sep 17 00:00:00 2001 From: David Wickes Date: Wed, 22 Feb 2017 17:26:20 +0000 Subject: [PATCH 3/3] Line 10 of ch09-02 now wraps at 80 characters --- src/ch09-02-recoverable-errors-with-result.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ch09-02-recoverable-errors-with-result.md b/src/ch09-02-recoverable-errors-with-result.md index edc597a0b..b8cb7c2fe 100644 --- a/src/ch09-02-recoverable-errors-with-result.md +++ b/src/ch09-02-recoverable-errors-with-result.md @@ -7,8 +7,8 @@ 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][handle_failure]” that the `Result` enum is defined as having two variants, `Ok` -and `Err`, as follows: +`Result` Type][handle_failure]” 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