]> git.lizzy.rs Git - rust.git/commitdiff
Fix assertions in examples of the exact_chunk() documentation
authorSebastian Dröge <sebastian@centricular.com>
Tue, 2 Jan 2018 12:55:25 +0000 (14:55 +0200)
committerSebastian Dröge <sebastian@centricular.com>
Sat, 13 Jan 2018 10:18:54 +0000 (12:18 +0200)
src/liballoc/slice.rs

index 6a3970f37285c5364498d511d2bdf5eda06a397a..9ff39363fd7ef0a95db6bb1a8b077e368eff3f96 100644 (file)
@@ -651,7 +651,6 @@ pub fn chunks(&self, chunk_size: usize) -> Chunks<T> {
     /// let mut iter = slice.chunks(2);
     /// assert_eq!(iter.next().unwrap(), &['l', 'o']);
     /// assert_eq!(iter.next().unwrap(), &['r', 'e']);
-    /// assert_eq!(iter.next().unwrap(), &['m']);
     /// assert!(iter.next().is_none());
     /// ```
     #[unstable(feature = "exact_chunks", issue = "47115")]
@@ -712,7 +711,7 @@ pub fn chunks_mut(&mut self, chunk_size: usize) -> ChunksMut<T> {
     ///     }
     ///     count += 1;
     /// }
-    /// assert_eq!(v, &[1, 1, 2, 2, 3]);
+    /// assert_eq!(v, &[1, 1, 2, 2]);
     /// ```
     #[unstable(feature = "exact_chunks", issue = "47115")]
     #[inline]