We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f243d43 commit 3a75e11Copy full SHA for 3a75e11
src/arrayvec.rs
@@ -880,6 +880,17 @@ pub struct IntoIter<T, const CAP: usize> {
880
index: usize,
881
v: ArrayVec<T, CAP>,
882
}
883
+impl<T, const CAP: usize> IntoIter<T, CAP> {
884
+ /// Returns the remaining items of this iterator as a slice.
885
+ pub fn as_slice(&self) -> &[T] {
886
+ &self.v[self.index..]
887
+ }
888
+
889
+ /// Returns the remaining items of this iterator as a mutable slice.
890
+ pub fn as_mut_slice(&mut self) -> &mut [T] {
891
+ &mut self.v[self.index..]
892
893
+}
894
895
impl<T, const CAP: usize> Iterator for IntoIter<T, CAP> {
896
type Item = T;
0 commit comments