title: Why use a reference to an immutable vector in a for loop?
body: <p>In <a href="https://doc.rust-lang.org/book/second-edition/ch08-01-vectors.html" rel="nofollow noreferrer">Chapter 8 of the Rust Book</a> they give they following <a href="https://doc.rust-lang.org/book/second-edition/ch08-01-vectors.html#iterating-over-the-values-in-a-vector" rel="nofollow noreferrer">example</a>:</p>
  
  <pre><code>let v = vec![100, 32, 57];
  for i in &amp;v {
      println!("{}", i);
  }
  </code></pre>
  
  <p>I don't understand why <code>&amp;v</code> was used instead of <code>v</code>.</p>
  
  <p>If <code>v</code> is immutable what is the purpose of using a reference instead of <code>v</code> itself?</p>