Skip to content

Commit e786891

Browse files
committed
rollup merge of rust-lang#17557 : sfackler/fuse-example
2 parents 94c1b1f + a4844a6 commit e786891

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/libcore/iter.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -366,7 +366,7 @@ pub trait Iterator<A> {
366366
/// let mut sum = 0;
367367
/// for x in it {
368368
/// if x > 5 {
369-
/// continue;
369+
/// break;
370370
/// }
371371
/// sum += x;
372372
/// }
@@ -377,6 +377,8 @@ pub trait Iterator<A> {
377377
/// sum
378378
/// }
379379
/// let x = vec![1i,2,3,7,8,9];
380+
/// assert_eq!(process(x.into_iter()), 6);
381+
/// let x = vec![1i,2,3];
380382
/// assert_eq!(process(x.into_iter()), 1006);
381383
/// ```
382384
#[inline]

0 commit comments

Comments
 (0)