Skip to content

Commit

Permalink
Rollup merge of rust-lang#59121 - czipperz:fix_assert_result_fromiter…
Browse files Browse the repository at this point in the history
…ater, r=Centril

impl FromIterator for Result: Use assert_eq! instead of assert!
  • Loading branch information
Centril authored Mar 13, 2019
2 parents 6c9bdc3 + 6b88c90 commit 106159d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/libcore/result.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1200,7 +1200,7 @@ impl<A, E, V: FromIterator<A>> FromIterator<Result<A, E>> for Result<V, E> {
/// let res: Result<Vec<u32>, &'static str> = v.iter().map(|x: &u32|
/// x.checked_add(1).ok_or("Overflow!")
/// ).collect();
/// assert!(res == Ok(vec![2, 3]));
/// assert_eq!(res, Ok(vec![2, 3]));
/// ```
#[inline]
fn from_iter<I: IntoIterator<Item=Result<A, E>>>(iter: I) -> Result<V, E> {
Expand Down

0 comments on commit 106159d

Please sign in to comment.