Skip to main content

prepend_reversed

Function prepend_reversed 

Source
unsafe fn prepend_reversed<T, A: Allocator>(
    deque: &mut VecDeque<T, A>,
    slice: &[T],
)
Expand description

Prepends elements of slice to deque in reverse order using a copy.

§Safety

  • deque must have space for slice.len() new elements.
  • Elements of slice will be copied into the deque, make sure to forget the elements if T is not Copy.