itybity/array.rs
1use crate::FromBitIterator;
2
3impl<const N: usize, T> FromBitIterator for [T; N]
4where
5 T: FromBitIterator,
6{
7 fn from_lsb0_iter(iter: impl IntoIterator<Item = bool>) -> Self {
8 let mut iter = iter.into_iter();
9 core::array::from_fn(|_| T::from_lsb0_iter(iter.by_ref()))
10 }
11
12 fn from_msb0_iter(iter: impl IntoIterator<Item = bool>) -> Self {
13 let mut iter = iter.into_iter();
14 core::array::from_fn(|_| T::from_msb0_iter(iter.by_ref()))
15 }
16}