Skip to content

Commit e4c0a82

Browse files
mendelsshopphimuemue
authored andcommitted
Added PoolIndex impl for Box<[usize]>
1 parent b0942d6 commit e4c0a82

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/combinations.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,16 @@ pub trait PoolIndex<T>: BorrowMut<[usize]> {
5252
self.borrow().len()
5353
}
5454
}
55+
impl<T> PoolIndex<T> for Box<[usize]> {
56+
type Item = Vec<T>;
5557

58+
fn extract_item<I: Iterator<Item = T>>(&self, pool: &LazyBuffer<I>) -> Vec<T>
59+
where
60+
T: Clone,
61+
{
62+
pool.get_at(self)
63+
}
64+
}
5665
impl<T> PoolIndex<T> for Vec<usize> {
5766
type Item = Vec<T>;
5867

0 commit comments

Comments
 (0)