title: How do I create an iterator of lines from a file that have been split into pieces?
body: <p>I have a file that I need to read line-by-line and break into two sentences separated by a "=". I am trying to use iterators, but I can't find how to use it properly within <code>split</code>. The documentation says that <code>std::str::Split</code> implements the trait, but I'm still clueless how to use it.</p>
  
  <pre><code>use std::{
      fs::File,
      io::{prelude::*, BufReader},
  };
  
  fn example(path: &amp;str) {
      for line in BufReader::new(File::open(path).expect("Failed at opening file.")).lines() {
          let words = line.unwrap().split("="); //need to make this an iterable
      }
  }
  </code></pre>
  
  <p>How can I use a trait I know is already implemented into something like split?</p>