diff --git a/src/ch12-02-reading-a-file.md b/src/ch12-02-reading-a-file.md index e45dded65..804683d50 100644 --- a/src/ch12-02-reading-a-file.md +++ b/src/ch12-02-reading-a-file.md @@ -30,7 +30,8 @@ First we bring in a relevant part of the standard library with a `use` statement: we need `std::fs` to handle files. In `main`, the new statement `fs::read_to_string` takes the `file_path`, opens -that file, and returns a `std::io::Result` of the file’s contents. +that file, and returns a value of type `std::io::Result` that contains +the file’s contents. After that, we again add a temporary `println!` statement that prints the value of `contents` after the file is read, so we can check that the program is diff --git a/src/ch12-03-improving-error-handling-and-modularity.md b/src/ch12-03-improving-error-handling-and-modularity.md index 2e76e82d9..8c6d2c736 100644 --- a/src/ch12-03-improving-error-handling-and-modularity.md +++ b/src/ch12-03-improving-error-handling-and-modularity.md @@ -270,7 +270,7 @@ well, which we’ll do in the next listing. Our `build` function returns a `Result` with a `Config` instance in the success -case and a `&'static str` in the error case. Our error values will always be +case and a string literal in the error case. Our error values will always be string literals that have the `'static` lifetime. We’ve made two changes in the body of the function: instead of calling `panic!`