title: What is the idiomatic way to remove the first N elements in a mutable Vec?
body: <p>Is there a good way to remove multiple elements at the start of a vector?</p>
  
  <p>I would like to avoid multiple removals which cause unnecessary memory copying operations.</p>
  
  <pre><code>while vec.len() &gt; n {
      vec.remove(0);
  }
  </code></pre>
  
  <hr>
  
  <ol>
  <li><p>I could use unsafe API's (<code>ptr::drop_in_place</code>, <code>ptr::copy</code>, <code>Vec::set_len</code>), but was hoping there were a more convenient way to handle this.</p></li>
  <li><p>Might an alternative solution be possible where the <code>Vec</code> pointer is offset and the range at the start is marked as free? (no memory copying required). <em>I now realize this requires Rust's underlying allocator to free memory by range not the initially allocated pointer, but it turns out this isn't the case.</em></p></li>
  </ol>