Skip to content

Commit 82447cf

Browse files
committed
Fix doc whitespace issues
1 parent 9f3a7f0 commit 82447cf

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/doc/trpl/closures.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,9 @@ The second is that the syntax is similar, but a bit different. I’ve added spac
5454
here to make them look a little closer:
5555

5656
```rust
57-
fn plus_one_v1 (x: i32 ) -> i32 { x + 1 }
58-
let plus_one_v2 = |x: i32 | -> i32 { x + 1 };
59-
let plus_one_v3 = |x: i32 | x + 1 ;
57+
fn plus_one_v1 (x: i32) -> i32 { x + 1 }
58+
let plus_one_v2 = |x: i32| -> i32 { x + 1 };
59+
let plus_one_v3 = |x: i32| x + 1 ;
6060
```
6161

6262
Small differences, but they’re similar in ways.
@@ -136,7 +136,7 @@ This gives us:
136136
note: `nums` moved into closure environment here because it has type
137137
`[closure(()) -> collections::vec::Vec<i32>]`, which is non-copyable
138138
let takes_nums = || nums;
139-
^~~~~~~
139+
^~~~~~~
140140
```
141141

142142
`Vec<T>` has ownership over its contents, and therefore, when we refer to it
@@ -352,8 +352,8 @@ error: the trait `core::marker::Sized` is not implemented for the type
352352
factory() -> (Fn(i32) -> Vec<i32>) {
353353
^~~~~~~~~~~~~~~~~~~~~
354354
note: `core::ops::Fn(i32) -> collections::vec::Vec<i32>` does not have a constant size known at compile-time
355-
fa ctory() -> (Fn(i32) -> Vec<i32>) {
356-
^~~~~~~~~~~~~~~~~~~~~
355+
factory() -> (Fn(i32) -> Vec<i32>) {
356+
^~~~~~~~~~~~~~~~~~~~~
357357
358358
```
359359

0 commit comments

Comments
 (0)