How do I reuse the SplitWhitespace iterator?
<p>I've got a piece of code which is supposed to check if two sentences are "too similar", as defined by a heuristic made clearest by the code.</p>

<pre><code>fn too_similar(thing1: &amp;String, thing2: &amp;String) -&gt; bool {
    let split1 = thing1.split_whitespace();
    let split2 = thing2.split_whitespace();

    let mut matches = 0;
    for s1 in split1 {
        for s2 in split2 {
            if s1.eq(s2) {
                matches = matches + 1;
                break;
            }
        }
    }

    let longer_length =
        if thing1.len() &gt; thing2.len() {
            thing1.len()
        } else {
            thing2.len()
        };

    matches &gt; longer_length / 2
}
</code></pre>

<p>However, I'm getting the following compilation error:</p>

<pre class="lang-none prettyprint-override"><code>error[E0382]: use of moved value: `split2`
 --&gt; src/main.rs:7:19
  |
7 |         for s2 in split2 {
  |                   ^^^^^^ value moved here in previous iteration of loop
  |
  = note: move occurs because `split2` has type `std::str::SplitWhitespace&lt;'_&gt;`, which does not implement the `Copy` trait
</code></pre>

<p>I'm not sure why <code>split2</code> is getting moved in the first place, but what's the Rust way of writing this function?</p>