Fix doctests for slice::exact_chunks() for real
This commit is contained in:
parent
802ba9ea5b
commit
e51a89a0ad
1 changed files with 2 additions and 2 deletions
|
@ -648,7 +648,7 @@ impl<T> [T] {
|
||||||
/// #![feature(exact_chunks)]
|
/// #![feature(exact_chunks)]
|
||||||
///
|
///
|
||||||
/// let slice = ['l', 'o', 'r', 'e', 'm'];
|
/// 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(), &['l', 'o']);
|
||||||
/// assert_eq!(iter.next().unwrap(), &['r', 'e']);
|
/// assert_eq!(iter.next().unwrap(), &['r', 'e']);
|
||||||
/// assert!(iter.next().is_none());
|
/// assert!(iter.next().is_none());
|
||||||
|
@ -711,7 +711,7 @@ impl<T> [T] {
|
||||||
/// }
|
/// }
|
||||||
/// count += 1;
|
/// count += 1;
|
||||||
/// }
|
/// }
|
||||||
/// assert_eq!(v, &[1, 1, 2, 2]);
|
/// assert_eq!(v, &[1, 1, 2, 2, 0]);
|
||||||
/// ```
|
/// ```
|
||||||
#[unstable(feature = "exact_chunks", issue = "47115")]
|
#[unstable(feature = "exact_chunks", issue = "47115")]
|
||||||
#[inline]
|
#[inline]
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue