title: Is it possible to find an element in a Vec<T> and remove it?
body: <p>In Rust, is there an in built function for finding and removing elements of a vector, both simultaneously and as separate actions?</p>
  
  <p>For example:</p>
  
  <pre><code>for f in factors {
      if f in list {
          list.remove(f);
      }
  }
  </code></pre>
  
  <p>Currently, the rust documentation is still a tad confusing, so while my search as shown up nothing, I feel like there is a good chance someone else may have found it.</p>