diff options
| author | Sebastian Dröge <sebastian@centricular.com> | 2018-01-02 19:21:39 +0200 |
|---|---|---|
| committer | Sebastian Dröge <sebastian@centricular.com> | 2018-01-13 12:18:55 +0200 |
| commit | e51a89a0ad35f42af9c39d4ada25a5ad9746cd62 (patch) | |
| tree | fce082361859f42f6392e4240daa49e733730111 /src/liballoc | |
| parent | 802ba9ea5b432d36444d8da8646bd2a1624b9dfa (diff) | |
| download | rust-e51a89a0ad35f42af9c39d4ada25a5ad9746cd62.tar.gz rust-e51a89a0ad35f42af9c39d4ada25a5ad9746cd62.zip | |
Fix doctests for slice::exact_chunks() for real
Diffstat (limited to 'src/liballoc')
| -rw-r--r-- | src/liballoc/slice.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/liballoc/slice.rs b/src/liballoc/slice.rs index 9ff39363fd7..182e9b0a00e 100644 --- a/src/liballoc/slice.rs +++ b/src/liballoc/slice.rs @@ -648,7 +648,7 @@ impl<T> [T] { /// #![feature(exact_chunks)] /// /// let slice = ['l', 'o', 'r', 'e', 'm']; - /// let mut iter = slice.chunks(2); + /// let mut iter = slice.exact_chunks(2); /// assert_eq!(iter.next().unwrap(), &['l', 'o']); /// assert_eq!(iter.next().unwrap(), &['r', 'e']); /// assert!(iter.next().is_none()); @@ -711,7 +711,7 @@ impl<T> [T] { /// } /// count += 1; /// } - /// assert_eq!(v, &[1, 1, 2, 2]); + /// assert_eq!(v, &[1, 1, 2, 2, 0]); /// ``` #[unstable(feature = "exact_chunks", issue = "47115")] #[inline] |
