From 09d1e421933918b29eac9eadde37594048ef8d98 Mon Sep 17 00:00:00 2001 From: David Tolnay Date: Wed, 25 Dec 2024 18:07:19 -0800 Subject: [PATCH] Implement repetition for arrays --- src/runtime.rs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/runtime.rs b/src/runtime.rs index dc29665..4923ccb 100644 --- a/src/runtime.rs +++ b/src/runtime.rs @@ -126,6 +126,14 @@ pub mod ext { } } + impl<'q, T: 'q, const N: usize> RepAsIteratorExt<'q> for [T; N] { + type Iter = slice::Iter<'q, T>; + + fn quote_into_iter(&'q self) -> (Self::Iter, HasIter) { + (self.iter(), HasIter) + } + } + impl<'q, T: 'q> RepAsIteratorExt<'q> for Vec { type Iter = slice::Iter<'q, T>;