Skip to content

Commit 056db97

Browse files
Merge pull request #3 from WaffleLapkin/box-into-iter-compat2
actually fix compatibility with future rust versions
2 parents f082bc1 + f6d0870 commit 056db97

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/lib.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ impl <T, const N: usize> IntoIterator for HeapArray<T, N> {
197197
// This moves the whole array from heap to the stack and is extremely inefficient.
198198
// After <https://github.com/rust-lang/rust/pull/134021> is merged, this could use
199199
// `<Box<[T; N]> as IntoIterator>::IntoIter`, which keeps the array in place.
200-
<[T; N]>::into_iter(*self.data)
200+
(*self.data).into_iter()
201201
}
202202
}
203203

@@ -461,7 +461,7 @@ impl <T, const M: usize, const N: usize> IntoIterator for HeapArray2D<T, M, N> {
461461
type IntoIter = <[[T; M]; N] as IntoIterator>::IntoIter;
462462

463463
fn into_iter(self) -> Self::IntoIter {
464-
self.data.into_iter()
464+
(*self.data).into_iter()
465465
}
466466
}
467467

@@ -737,7 +737,7 @@ impl <T, const L: usize, const M: usize, const N: usize> IntoIterator for HeapAr
737737
type IntoIter = <[[[T; L]; M]; N] as IntoIterator>::IntoIter;
738738

739739
fn into_iter(self) -> Self::IntoIter {
740-
self.data.into_iter()
740+
(*self.data).into_iter()
741741
}
742742
}
743743

0 commit comments

Comments
 (0)