title: Converting between Vec<i8> and &str
body: <p>I have a <code>Vec&lt;i8&gt;</code> I need to read as <code>&amp;str</code>. Right now I've found two ways to do it, both of which leave me unhappy. </p>
  
  <pre><code>// Quite complex for something this simple
  str::from_utf8(buffer.into_iter().map(|c| c as u8).collect::&lt;Vec&lt;u8&gt;&gt;().as_slice())
  </code></pre>
  
  <p>and</p>
  
  <pre><code>// transmute makes me uncomfortable
  str::from_utf8(mem::transmute::&lt;Vec&lt;i8&gt;, Vec&lt;u8&gt;&gt;(buffer).as_slice());
  </code></pre>
  
  <p>Are there any simpler ways of achieving this?</p>