Skip to content
Permalink
Browse files

add missing braces

add missing braces analogous to those suggested by killercup
  • Loading branch information...
pnkfelix committed Mar 25, 2019
1 parent 6315221 commit 0e83e96852e9aacde2bf633bb17b293910073812
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/libcore/result.rs
@@ -1220,10 +1220,10 @@ impl<A, E, V: FromIterator<A>> FromIterator<Result<A, E>> for Result<V, E> {
/// ```
/// let v = vec![3, 2, 1, 10];
/// let mut shared = 0;
/// let res: Result<Vec<u32>, &'static str> = v.iter().map(|x: &u32|
/// let res: Result<Vec<u32>, &'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);
/// ```

0 comments on commit 0e83e96

Please sign in to comment.
You can’t perform that action at this time.