spinoso_array/array/vec/
iter.rs

1use core::slice::{Iter, IterMut};
2
3use super::Array;
4
5impl<'a, T> IntoIterator for &'a Array<T> {
6    type Item = &'a T;
7    type IntoIter = Iter<'a, T>;
8
9    #[inline]
10    fn into_iter(self) -> Self::IntoIter {
11        self.0.iter()
12    }
13}
14
15impl<'a, T> IntoIterator for &'a mut Array<T> {
16    type Item = &'a mut T;
17    type IntoIter = IterMut<'a, T>;
18
19    #[inline]
20    fn into_iter(self) -> Self::IntoIter {
21        self.0.iter_mut()
22    }
23}