Skip to content

Commit

Permalink
Implement repetition for arrays
Browse files Browse the repository at this point in the history
  • Loading branch information
dtolnay committed Dec 26, 2024
1 parent 5bba89f commit 09d1e42
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/runtime.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<T> {
type Iter = slice::Iter<'q, T>;

Expand Down

0 comments on commit 09d1e42

Please sign in to comment.