title: What's a nice way to create a new vector by consuming two vectors?
body: <p>I would like a nice function to create a new vector, and to communicate that the argument vectors are no longer relevant and should be destroyed, take ownership of them. I don't particularly want to have to make either of the arguments mutable (to use <code>append</code>, <code>extend</code>, or <code>push_all</code> and thus change the calling signature). Code (<a href="https://play.rust-lang.org/?gist=ed449322da331139d5b3&amp;version=stable" rel="nofollow">playpen link</a>):</p>
  
  <pre><code>fn main () {
      let arg1 = vec![1, 2, 3];
      let arg2 = vec![4, 5, 6];
      let desired = consume_and_concat(arg1, arg2);
      assert_eq!(desired, vec![1, 2, 3, 4, 5, 6]);
  }
  
  fn consume_and_concat(vec1: Vec&lt;i32&gt;, vec2: Vec&lt;i32&gt;) -&gt; Vec&lt;i32&gt; {
      // something nice here
  }
  </code></pre>
  
  <p>I know there's no <code>+</code> for <code>Vec</code>s. In Ruby, I'd do <code>vec1 + vec2</code> or <code>vec1.concat(vec2)</code> or <code>[vec1, vec2].flatten</code>. Is there something similarly elegant that I'm missing?</p>