Luna::RingDeque::resize

void resize(usize n, const value_type &v)

Resizes the queue.

If the new size is greater than size, new elements will be copy-inserted at the back of the queue using the provided value.

If the new size is smaller than size, size - n elements will be removed from the back of the queue.

If the new size is equal to size, this function does nothing.

Parameters

  • in n

    The new size of the queue.

  • in v

    The initial value to copy for new elements.