about summary refs log tree commit diff
path: root/src/libcore
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2014-09-29 08:12:37 -0700
committerAlex Crichton <alex@alexcrichton.com>2014-09-29 08:12:37 -0700
commite786891d41c1e3d03ac2cf91fe4b5673137db11d (patch)
tree06a171bea5ae7f54c31333fcaa0ac514e4f0b6d6 /src/libcore
parent94c1b1f30c817d83d5cd22c5509364a61e18dfec (diff)
parenta4844a65e282a7f603dbc20f63476dff28d84d33 (diff)
downloadrust-e786891d41c1e3d03ac2cf91fe4b5673137db11d.tar.gz
rust-e786891d41c1e3d03ac2cf91fe4b5673137db11d.zip
rollup merge of #17557 : sfackler/fuse-example
Diffstat (limited to 'src/libcore')
-rw-r--r--src/libcore/iter.rs4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/libcore/iter.rs b/src/libcore/iter.rs
index f78c8c2aa0e..9799e9d3980 100644
--- a/src/libcore/iter.rs
+++ b/src/libcore/iter.rs
@@ -366,7 +366,7 @@ pub trait Iterator<A> {
     ///     let mut sum = 0;
     ///     for x in it {
     ///         if x > 5 {
-    ///             continue;
+    ///             break;
     ///         }
     ///         sum += x;
     ///     }
@@ -377,6 +377,8 @@ pub trait Iterator<A> {
     ///     sum
     /// }
     /// let x = vec![1i,2,3,7,8,9];
+    /// assert_eq!(process(x.into_iter()), 6);
+    /// let x = vec![1i,2,3];
     /// assert_eq!(process(x.into_iter()), 1006);
     /// ```
     #[inline]