Skip to content

Commit

Permalink
Snapshot changes to ch 10 to consider sending to nostarch
Browse files Browse the repository at this point in the history
  • Loading branch information
carols10cents committed May 28, 2024
1 parent 553bb20 commit 81e74f9
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions nostarch/chapter10.md
Original file line number Diff line number Diff line change
Expand Up @@ -1193,9 +1193,9 @@ when the lifetimes of references could be related in a few different ways. Rust
requires us to annotate the relationships using generic lifetime parameters to
ensure the actual references used at runtime will definitely be valid.

Annotating lifetimes is not even a concept most other programming languages
have, so this is going to feel unfamiliar. Although we won’t cover lifetimes in
their entirety in this chapter, we’ll discuss common ways you might encounter
Annotating lifetimes is not a concept most other programming languages have, so
this is going to feel unfamiliar. Although we won’t cover lifetimes in their
entirety in this chapter, we’ll discuss common ways you might encounter
lifetime syntax so you can get comfortable with the concept.

### Preventing Dangling References with Lifetimes
Expand Down Expand Up @@ -1313,7 +1313,7 @@ Here, `x` has the lifetime `'b`, which in this case is larger than `'a`. This
means `r` can reference `x` because Rust knows that the reference in `r` will
always be valid while `x` is valid.

Now that you know where the lifetimes of references are and how Rust analyzes
Now that you know what the lifetimes of references are and how Rust analyzes
lifetimes to ensure references will always be valid, let’s explore generic
lifetimes of parameters and return values in the context of functions.

Expand Down

0 comments on commit 81e74f9

Please sign in to comment.