Add slice::rchunks(), rchunks_mut(), rchunks_exact() and rchunks_exact_mut()

These work exactly like the normal chunks iterators but start creating
chunks from the end of the slice.

See #55177 for the tracking issue
This commit is contained in:
Sebastian Dröge
2018-09-26 01:35:54 +03:00
parent 567557f630
commit 80a8e5c1f7
7 changed files with 1058 additions and 35 deletions

View File

@@ -125,6 +125,8 @@ pub use core::slice::{from_ref, from_mut};
pub use core::slice::SliceIndex;
#[unstable(feature = "chunks_exact", issue = "47115")]
pub use core::slice::{ChunksExact, ChunksExactMut};
#[unstable(feature = "rchunks", issue = "55177")]
pub use core::slice::{RChunks, RChunksMut, RChunksExact, RChunksExactMut};
////////////////////////////////////////////////////////////////////////////////
// Basic slice extension methods