From 0e83e96852e9aacde2bf633bb17b293910073812 Mon Sep 17 00:00:00 2001 From: Felix S Klock II Date: Mon, 25 Mar 2019 11:50:11 +0100 Subject: [PATCH] add missing braces add missing braces analogous to those suggested by killercup --- src/libcore/result.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/libcore/result.rs b/src/libcore/result.rs index 490cd5bb3fe..9b7b8368986 100644 --- a/src/libcore/result.rs +++ b/src/libcore/result.rs @@ -1220,10 +1220,10 @@ impl> FromIterator> for Result { /// ``` /// let v = vec![3, 2, 1, 10]; /// let mut shared = 0; - /// let res: Result, &'static str> = v.iter().map(|x: &u32| + /// let res: Result, &'static str> = v.iter().map(|x: &u32| { /// shared += x; /// x.checked_sub(2).ok_or("Underflow!") - /// ).collect(); + /// }).collect(); /// assert_eq!(res, Err("Underflow!")); /// assert_eq!(shared, 6); /// ```