fn search_chunk_combinations<'gr>(
    counts_needed_from_non_required_chunks: &Breakdown,
    non_required_chunks: &[(&'gr StandardChunkId, &'gr Chunk)],
) -> Vec<HashSet<&'gr StandardChunkId>> {
    let mut chunk_patterns = Vec::<HashSet<&StandardChunkId>>::new();
    let mut chunks_used = HashSet::<&StandardChunkId>::new();
    let mut iter_count_down = ITERATION_LIMIT;
    search_chunks(
        non_required_chunks.iter(),
        counts_needed_from_non_required_chunks,
        non_required_chunks,
        &mut chunks_used,
        &mut chunk_patterns,
        &mut iter_count_down,
    );
    chunk_patterns
}
/// Search every combination of the musical chunks, adding any working sets of chunks to
/// `chunk_patterns`.
// TODO: Why is this returning duplicates?
Search every combination of the musical chunks, adding any working sets of chunks to
`chunk_patterns`.
Search every combination of the musical chunks adding any working sets of chunks to ` chunk_patterns ` .
fn search_chunk_combinations<'gr>(
    counts_needed_from_non_required_chunks: &Breakdown,
    non_required_chunks: &[(&'gr StandardChunkId, &'gr Chunk)],
) -> Vec<HashSet<&'gr StandardChunkId>> {
    let mut chunk_patterns = Vec::<HashSet<&StandardChunkId>>::new();
    let mut chunks_used = HashSet::<&StandardChunkId>::new();
    let mut iter_count_down = ITERATION_LIMIT;
    search_chunks(
        non_required_chunks.iter(),
        counts_needed_from_non_required_chunks,
        non_required_chunks,
        &mut chunks_used,
        &mut chunk_patterns,
        &mut iter_count_down,
    );
    chunk_patterns
}
fn search_chunk_combinations < ' gr > ( counts_needed_from_non_required_chunks : & Breakdown , non_required_chunks : & [ ( & ' gr StandardChunkId , & ' gr Chunk ) ] , ) -> Vec < HashSet < & ' gr StandardChunkId > > { let mut chunk_patterns = Vec :: < HashSet < & StandardChunkId > > :: new ( ) ; let mut chunks_used = HashSet :: < & StandardChunkId > :: new ( ) ; let mut iter_count_down = ITERATION_LIMIT ; search_chunks ( non_required_chunks . iter ( ) , counts_needed_from_non_required_chunks , non_required_chunks , & mut chunks_used , & mut chunk_patterns , & mut iter_count_down , ) ; chunk_patterns }
Search every combination of the musical chunks, adding any working sets of chunks to
`chunk_patterns`.
Search every combination of the musical chunks adding any working sets of chunks to ` chunk_patterns ` .
counts_needed_from_non_required_chunks
&Breakdown
non_required_chunks
&[(&'gr StandardChunkId, &'gr Chunk)]
counts_needed_from_non_required_chunks
&Breakdown
non_required_chunks
&[(&'gr StandardChunkId, &'gr Chunk)]