We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
CombinationsWithReplacement
1 parent 8dd75f1 commit a0411d6Copy full SHA for a0411d6
src/combinations_with_replacement.rs
@@ -1,3 +1,4 @@
1
+use alloc::boxed::Box;
2
use alloc::vec::Vec;
3
use std::fmt;
4
use std::iter::FusedIterator;
@@ -16,7 +17,7 @@ where
16
17
I: Iterator,
18
I::Item: Clone,
19
{
- indices: Vec<usize>,
20
+ indices: Box<[usize]>,
21
pool: LazyBuffer<I>,
22
first: bool,
23
}
@@ -46,7 +47,7 @@ where
46
47
48
49
- let indices: Vec<usize> = alloc::vec![0; k];
50
+ let indices = alloc::vec![0; k].into_boxed_slice();
51
let pool: LazyBuffer<I> = LazyBuffer::new(iter);
52
53
CombinationsWithReplacement {
0 commit comments