mirror of
https://github.com/rust-lang/book.git
synced 2026-05-16 06:50:41 -04:00
Reword to avoid a/an where pronunciation is unclear
This commit is contained in:
committed by
Carol (Nichols || Goulding)
parent
8880eacd33
commit
bffbeb1102
@@ -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<String>` of the file’s contents.
|
||||
that file, and returns a value of type `std::io::Result<String>` 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
|
||||
|
||||
@@ -270,7 +270,7 @@ well, which we’ll do in the next listing.
|
||||
</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!`
|
||||
|
||||
Reference in New Issue
Block a user