title: How do I avoid unwrap when converting a vector of Options or Results to only the successful values?
body: <p>I have a <code>Vec&lt;Result&lt;T, E&gt;&gt;</code> and I want to ignore all <code>Err</code> values, converting it into a <code>Vec&lt;T&gt;</code>. I can do this:</p>
  
  <pre><code>vec.into_iter().filter(|e| e.is_ok()).map(|e| e.unwrap()).collect()
  </code></pre>
  
  <p>This is safe, but I want to avoid using <code>unwrap</code>. Is there a better way to write this?</p>