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