Skip to content

Commit

Permalink
add missing braces
Browse files Browse the repository at this point in the history
add missing braces analogous to those suggested by killercup
  • Loading branch information
pnkfelix committed Mar 25, 2019
1 parent 6315221 commit 0e83e96
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/libcore/result.rs
Expand Up @@ -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);
/// ```
Expand Down

0 comments on commit 0e83e96

Please sign in to comment.