Skip to content

Commit 89fe9cb

Browse files
author
gaoyuan
committed
fix those grouped reference starts with Listings
1 parent 265e26f commit 89fe9cb

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/ch10-03-lifetime-syntax.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ scope.
3434

3535
</Listing>
3636

37-
> Note: The examples in Listings 10-16, 10-17, and 10-23 declare variables
37+
> Note: The examples in [Listings 10-16](#listing-10-16), [10-17](#listing-10-17), and [10-23](#listing-10-23) declare variables
3838
> without giving them an initial value, so the variable name exists in the outer
3939
> scope. At first glance, this might appear to be in conflict with Rust’s having
4040
> no null values. However, if we try to use a variable before giving it a value,
@@ -148,7 +148,7 @@ When we’re defining this function, we don’t know the concrete values that wi
148148
be passed into this function, so we don’t know whether the `if` case or the
149149
`else` case will execute. We also don’t know the concrete lifetimes of the
150150
references that will be passed in, so we can’t look at the scopes as we did in
151-
Listings 10-17 and 10-18 to determine whether the reference we return will
151+
Listings [10-17](#listing-10-17) and [10-18](#listing-10-18) to determine whether the reference we return will
152152
always be valid. The borrow checker can’t determine this either, because it
153153
doesn’t know how the lifetimes of `x` and `y` relate to the lifetime of the
154154
return value. To fix this error, we’ll add generic lifetime parameters that

src/ch21-02-multithreaded.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -671,7 +671,7 @@ thread run them.
671671
> multiple instances of the same request sequentially for caching reasons. This
672672
> limitation is not caused by our web server.
673673
674-
This is a good time to pause and consider how the code in Listings 21-18, 21-19,
674+
This is a good time to pause and consider how the code in [Listings 21-18](#listing-21-18), [21-19](#listing-21-19),
675675
and 21-20 would be different if we were using futures instead of a closure for
676676
the work to be done. What types would change? How would the method signatures be
677677
different, if at all? What parts of the code would stay the same?

0 commit comments

Comments
 (0)