From 502c876cf9553671b7cddaedb8872ea19ef7ddc3 Mon Sep 17 00:00:00 2001 From: Steve Klabnik Date: Sun, 8 Jan 2017 22:04:08 +0000 Subject: [PATCH] rebuild pages at 84f57f5 --- ch09-02-recoverable-errors-with-result.html | 2 +- ch09-03-to-panic-or-not-to-panic.html | 4 ++-- ch10-03-lifetime-syntax.html | 2 +- print.html | 8 ++++---- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/ch09-02-recoverable-errors-with-result.html b/ch09-02-recoverable-errors-with-result.html index 7c89803a8..7e1b60a63 100644 --- a/ch09-02-recoverable-errors-with-result.html +++ b/ch09-02-recoverable-errors-with-result.html @@ -377,7 +377,7 @@ fn read_username_from_file() -> Result<String, io::Error> { Result<T, E> where the generic parameter T has been filled in with the concrete type String, and the generic type E has been filled in with the concrete type io::Error. If this function succeeds without any problems, the -caller of this function will receive an Ok value that holds a String -- the +caller of this function will receive an Ok value that holds a String—the username that this function read from the file. If this function encounters any problems, the caller of this function will receive an Err value that holds an instance of io::Error that contains more information about what the problems diff --git a/ch09-03-to-panic-or-not-to-panic.html b/ch09-03-to-panic-or-not-to-panic.html index b1c669eed..e30c4d113 100644 --- a/ch09-03-to-panic-or-not-to-panic.html +++ b/ch09-03-to-panic-or-not-to-panic.html @@ -128,9 +128,9 @@ hardcoded into the program, and therefore did have a possibility of fai we'd definitely want to handle the Result in a more robust way instead.

Guidelines for Error Handling

It's advisable to have your code panic! when it's possible that you could end -up in a bad state---in this context, bad state is when some assumption, +up in a bad state—in this context, bad state is when some assumption, guarantee, contract, or invariant has been broken, such as when invalid values, -contradictory values, or missing values are passed to your code---plus one or +contradictory values, or missing values are passed to your code—plus one or more of the following: