mirror of
https://github.com/rust-lang/book.git
synced 2026-11-30 21:51:17 -06:00
Fix spelling errors caught by aspell!!!!!!!!!
This commit is contained in:
@@ -339,10 +339,10 @@ into that section to keep that whole discussion together. /Carol
|
||||
|
||||
### Propagating Errors
|
||||
|
||||
When writing a function whose implementation calls sometheing that might fail,
|
||||
When writing a function whose implementation calls something that might fail,
|
||||
instead of handling the error within this function, you can choose to let your
|
||||
caller know about the error so they can decide what to do. This is known as
|
||||
*propogating* the error, and gives more control to the calling code where there
|
||||
*propagating* the error, and gives more control to the calling code where there
|
||||
might be more information or logic that dictates how the error should be
|
||||
handled than what you have available in the context of your code.
|
||||
|
||||
|
||||
@@ -66,7 +66,7 @@ here. However, having a hardcoded, valid string doesn't change the return type
|
||||
of the `parse` method: we still get a `Result` value, and the compiler will
|
||||
still make us handle the `Result` as if the `Err` variant is still a possibility
|
||||
since the compiler isn't smart enough to see that this string is always a
|
||||
parseable IP address. If the IP address string came from a user instead of being
|
||||
parsable IP address. If the IP address string came from a user instead of being
|
||||
hardcoded into the program, and therefore *did* have a possibility of failure,
|
||||
we'd definitely want to handle the `Result` in a more robust way instead.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user