mirror of
https://github.com/roc-lang/roc.git
synced 2025-08-04 04:08:19 +00:00
Add missing thrid item to soa_slice3 iter
This commit is contained in:
parent
4dd61e5c3c
commit
11f37eeb59
1 changed files with 7 additions and 3 deletions
|
@ -103,7 +103,7 @@ impl<T, U, V> Slice3<T, U, V> {
|
|||
}
|
||||
|
||||
impl<T, U, V> IntoIterator for Slice3<T, U, V> {
|
||||
type Item = (Index<T>, Index<U>);
|
||||
type Item = (Index<T>, Index<U>, Index<V>);
|
||||
type IntoIter = SliceIterator<T, U, V>;
|
||||
|
||||
fn into_iter(self) -> Self::IntoIter {
|
||||
|
@ -120,7 +120,7 @@ pub struct SliceIterator<T, U, V> {
|
|||
}
|
||||
|
||||
impl<T, U, V> Iterator for SliceIterator<T, U, V> {
|
||||
type Item = (Index<T>, Index<U>);
|
||||
type Item = (Index<T>, Index<U>, Index<V>);
|
||||
|
||||
fn next(&mut self) -> Option<Self::Item> {
|
||||
let offset = self.offset;
|
||||
|
@ -134,10 +134,14 @@ impl<T, U, V> Iterator for SliceIterator<T, U, V> {
|
|||
index: self.slice.start2 + offset,
|
||||
_marker: PhantomData,
|
||||
};
|
||||
let index3 = Index {
|
||||
index: self.slice.start3 + offset,
|
||||
_marker: PhantomData,
|
||||
};
|
||||
|
||||
self.offset += 1;
|
||||
|
||||
Some((index1, index2))
|
||||
Some((index1, index2, index3))
|
||||
} else {
|
||||
None
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue