Skip to main content

merge_chains

Function merge_chains 

Source
pub fn merge_chains<C: Chunk>(
    chain1: Vec<C>,
    chain2: Vec<C>,
    out: &mut VecDeque<C>,
)
Expand description

Merge two full chains of chunks into one, to completion, appending to out.

The plain whole-chain driver: ticks Chunk::merge until one deque empties, then appends the other’s remainder (the verbatim tail). Output is near-graded, not settled. The batcher’s merge runs the same loop but settles after each push (the bounded-footprint discipline) and so does not use this; it stays as the simplest way to drive Chunk::merge to completion.