Skip to content

Commit 81386cf

Browse files
authored
Fixed some typos
1 parent 3ab8054 commit 81386cf

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/doc/book/closures.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -336,7 +336,7 @@ could annotate it on the function declaration:
336336

337337
```rust,ignore
338338
fn call_with_ref<'a, F>(some_closure:F) -> i32
339-
where F: Fn(&'a 32) -> i32 {
339+
where F: Fn(&'a i32) -> i32 {
340340
```
341341

342342
However this presents a problem with in our case. When you specify the explicit
@@ -350,7 +350,7 @@ of the closure we can use Higher-Ranked Trait Bounds with the `for<...>` syntax:
350350

351351
```ignore
352352
fn call_with_ref<F>(some_closure:F) -> i32
353-
where F: for<'a> Fn(&'a 32) -> i32 {
353+
where F: for<'a> Fn(&'a i32) -> i32 {
354354
```
355355

356356
This lets the Rust compiler find the minimum lifetime to invoke our closure and

0 commit comments

Comments
 (0)