title: How do I interleave two Rust vectors by chunks of threes into a new vector?
body: <p>I need an idiomatic way to interlace these two vectors:</p>
  
  <pre><code>let v1 = vec![1.0, 2.0, 3.0, 4.0, 5.0, 6.0];
  let v2 = vec![7.0, 8.0, 9.0, 10.0, 11.0, 12.0];
  </code></pre>
  
  <p>The output I expect is:</p>
  
  <pre><code>[1.0, 2.0, 3.0,
   7.0, 8.0, 9.0,
   4.0, 5.0, 6.0,
   10.0, 11.0, 12.0];
  </code></pre>
  
  <p>I used itertools <code>chunks</code> method, but I don't believe this is the best implementation because there are two <code>collect</code> calls.</p>
  
  <pre><code>let output = interleave(&amp;v1.into_iter().chunks(3), &amp;v2.into_iter().chunks(3)).map(|v| {v.into_iter().collect::&lt;Vec&lt;f32&gt;&gt;()}).flatten().collect::&lt;Vec&lt;f32&gt;&gt;();
  </code></pre>
  
  <p>Is there a better way to write this iterator using itertools?</p>