title: Split a string and return Vec<String>
body: <p>I want to split a string and return <code>Vec&lt;String&gt;</code> from my function. It has to be <code>Vec&lt;String&gt;</code> and not <code>Vec&lt;&amp;str&gt;</code> because I can't return <code>Vec&lt;&amp;str&gt;</code>, can I? If I can, though, how can I do that?</p>
  
  <pre><code>let var1: Vec&lt;&amp;str&gt; = my_string.split("something").collect();
  let res = var1.iter().map(|x| x.to_string());
  // I want to return Vec&lt;String&gt;
  </code></pre>
  
  <p>I've tried different versions but gotten <code>error: mismatched types</code> and other kinds of similar errors. Is there an easier way?</p>