title: Reading all file contents in current directory to a vector
body: <p>I want to read all the files in the current directory.</p>
  
  <p>Here's my progress:</p>
  
  <pre class="lang-rust prettyprint-override"><code>use std::fs;
  
  fn main() {
      let files = fs::read_dir(".").unwrap();
      files
          .filter_map(Result::ok)
          .filter(|d| if let Some(e) = d.path().extension() { e == "txt" } else {false})
          .for_each(|f| println!("{:?}", f));
  }
  </code></pre>
  
  <p>Here I got a little lost, how can I read all file contents? Should I add them to a growing <code>Vec</code> in the <code>for_each</code> block? if so then how?</p>