Skip to content

Commit

Permalink
add note to array_chunks
Browse files Browse the repository at this point in the history
  • Loading branch information
lcnr committed Jul 31, 2020
1 parent 95fa63e commit a410ebc
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion library/core/src/slice/mod.rs
Expand Up @@ -848,6 +848,8 @@ impl<T> [T] {
/// slice, then the last up to `N-1` elements will be omitted and can be retrieved
/// from the `remainder` function of the iterator.
///
/// This method is the const generic equivalent of [`chunks_exact`].
///
/// # Panics
///
/// Panics if `N` is 0.
Expand All @@ -864,7 +866,7 @@ impl<T> [T] {
/// assert_eq!(iter.remainder(), &['m']);
/// ```
///
/// [`chunks`]: #method.chunks
/// [`chunks_exact`]: #method.chunks_exact
#[unstable(feature = "array_chunks", issue = "none")]
#[inline]
pub fn array_chunks<const N: usize>(&self) -> ArrayChunks<'_, T, N> {
Expand Down

0 comments on commit a410ebc

Please sign in to comment.