Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions nostarch/chapter02.md
Original file line number Diff line number Diff line change
Expand Up @@ -278,9 +278,9 @@ on which variant an enum value is when the conditional is evaluated.
Chapter 6 will cover enums in more detail. The purpose of these `Result` types
is to encode error-handling information.

`Result`’s variants are `Ok` or `Err`. The `Ok` variant indicates the
operation was successful, and inside `Ok` is the successfully generated value.
The `Err` variant means the operation failed, and `Err` contains information
`Result`’s variants are `Ok` and `Err`. The `Ok` variant indicates that the
operation was successful, and it contains the successfully generated value.
The `Err` variant means the operation failed, and it contains information
about how or why the operation failed.

Values of the `Result` type, like values of any type, have methods defined on
Expand Down
2 changes: 1 addition & 1 deletion nostarch/chapter03.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ isn’t safely doing what you want it to do yet; they do *not* mean that you’r
not a good programmer! Experienced Rustaceans still get compiler errors.

The error message indicates that the cause of the error is that you `` cannot
assign twice to immutable variable `x` ``, because you tried to assign a second
assign twice to immutable variable ``, because you tried to assign a second
value to the immutable `x` variable.

It’s important that we get compile-time errors when we attempt to change a
Expand Down
4 changes: 2 additions & 2 deletions nostarch/chapter04.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ strings.
> data on the heap so you don’t run out of space are all problems that ownership
> addresses. Once you understand ownership, you won’t need to think about the
> stack and the heap very often, but knowing that the main purpose of ownership
> is to manage heap data can help explain why it works the way it does.
> is to manage heap data and can help explain why it works the way it does.

### Ownership Rules

Expand Down Expand Up @@ -150,7 +150,7 @@ understanding by introducing the `String` type.

To illustrate the rules of ownership, we need a data type that is more complex
than those we covered in the “Data Types” section of Chapter 3. The types
covered previously are all a known size, can be stored on the stack and popped
covered previously are all of a known size, can be stored on the stack and popped
off the stack when their scope is over, and can be quickly and trivially copied
to make a new, independent instance if another part of code needs to use the
same value in a different scope. But we want to look at data that is stored on
Expand Down