title: mismatched types expected `i8`, found `()`
body: <p>I am trying to make a temperature converter in Rust, but for some reason my code here gives me an error. I am trying to convert the choice <code>String</code> to an <code>i8</code> type.</p>
  <pre class="lang-rust prettyprint-override"><code>use std::io;
  
  fn main() {
      println!(&quot;Welcome! Would you like to convert from (1) Fahrenheit to Celsius, or (2) from Celsius to Fahrenheit?&quot;);
      let mut choice = String::new();
  
      io::stdin()
          .read_line(&amp;mut choice)
          .expect(&quot;Failed to read line&quot;);
  
      println!(&quot;{}&quot;, choice);
  
      let choice: i8 = match choice.trim().parse() {
          Ok(num) =&gt; num,
          Err(_) =&gt; {
              println!(&quot;Invalid input, please input a number.&quot;);
          }
      };
  }
  
  fn convert_to_c(f_temp: f64) {
      let mut c_temp: f64;
      c_temp = f_temp - 32.0 * 0.5556;
      println!(&quot;{}F in Celsius is: {}&quot;, f_temp, c_temp);
  }
  
  fn convert_to_f(c_temp: f64) {
      let mut f_temp: f64;
      f_temp = c_temp * 1.8 + 32.0;
      println!(&quot;{}C in Fahrenheit is: {}&quot;, c_temp, f_temp);
  }
  </code></pre>
  <pre class="lang-none prettyprint-override"><code>error[E0308]: mismatched types
    --&gt; src/main.rs:15:19
     |
  15 |           Err(_) =&gt; {
     |  ___________________^
  16 | |             println!(&quot;Invalid input, please input a number.&quot;);
  17 | |         }
     | |_________^ expected `i8`, found `()`
  </code></pre>