title: Non-exhaustive patterns - Rust match expressions
body: <p>I have an issue with the following Rust code:</p>
  
  <pre><code>pub fn median(v: &amp;Vec&lt;i32&gt;) -&gt; f32 {
      let len = v.len();
      match len % 2 {
          0 =&gt; (v[len / 2 - 1] + v[len / 2]) as f32 / 2 as f32,
          1 =&gt; v[(len - 1) / 2] as f32,
      }
  }
  </code></pre>
  
  <p>This code doesn't compile due to a 'Non exhaustive patterns' error.
  Why is that? What does the % operator return?</p>