From 82447cf5006b0ebdbcf47b796cc521ee0d88f3fa Mon Sep 17 00:00:00 2001 From: peferron Date: Sun, 17 May 2015 02:48:09 -0700 Subject: [PATCH] Fix doc whitespace issues --- src/doc/trpl/closures.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/doc/trpl/closures.md b/src/doc/trpl/closures.md index d7fa84761e5..d2fe9c6e550 100644 --- a/src/doc/trpl/closures.md +++ b/src/doc/trpl/closures.md @@ -54,9 +54,9 @@ The second is that the syntax is similar, but a bit different. I’ve added spac here to make them look a little closer: ```rust -fn plus_one_v1 (x: i32 ) -> i32 { x + 1 } -let plus_one_v2 = |x: i32 | -> i32 { x + 1 }; -let plus_one_v3 = |x: i32 | x + 1 ; +fn plus_one_v1 (x: i32) -> i32 { x + 1 } +let plus_one_v2 = |x: i32| -> i32 { x + 1 }; +let plus_one_v3 = |x: i32| x + 1 ; ``` Small differences, but they’re similar in ways. @@ -136,7 +136,7 @@ This gives us: note: `nums` moved into closure environment here because it has type `[closure(()) -> collections::vec::Vec]`, which is non-copyable let takes_nums = || nums; - ^~~~~~~ + ^~~~~~~ ``` `Vec` 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 factory() -> (Fn(i32) -> Vec) { ^~~~~~~~~~~~~~~~~~~~~ note: `core::ops::Fn(i32) -> collections::vec::Vec` does not have a constant size known at compile-time -fa ctory() -> (Fn(i32) -> Vec) { - ^~~~~~~~~~~~~~~~~~~~~ +factory() -> (Fn(i32) -> Vec) { + ^~~~~~~~~~~~~~~~~~~~~ ```