From 994177468cde7fa34ce2a81b47b7397e30cc165d Mon Sep 17 00:00:00 2001 From: Waffle Lapkin Date: Tue, 23 Jun 2026 12:46:34 +0200 Subject: [PATCH] fix compilation in future rust versions --- src/lib.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/lib.rs b/src/lib.rs index 8fd71ac..969d4b7 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -194,7 +194,10 @@ impl IntoIterator for HeapArray { type IntoIter = <[T; N] as IntoIterator>::IntoIter; fn into_iter(self) -> Self::IntoIter { - self.data.into_iter() + // This moves the whole array from heap to the stack and is extremely inefficient. + // After is merged, this could use + // ` as IntoIterator>::IntoIter`, which keeps the array in place. + <[T; N]>::into_iter(*self.data) } }