title: Are nested matches a bad practice in idiomatic Rust?
body: <p>I have a <code>get_url_content</code> function and don't care about errors (it's just a test). It returns an <code>Option&lt;String&gt;</code>.</p>
  
  <pre><code>extern crate hyper;
  
  use std::io::Read;
  use hyper::client::Client;
  
  fn get_url_content(url: &amp;str) -&gt; Option&lt;String&gt; {
      let client = Client::new();
      let mut s = String::new();
  
      match client.get(url).send() {
          Ok(mut res) =&gt; {
              match res.read_to_string(&amp;mut s) {
                  Ok(_) =&gt; {
                      Some(s)
                  },
                  Err(_) =&gt; {
                      None
                  }
              }
          },
          Err(_) =&gt; {
              None
          }
      }
  }
  </code></pre>
  
  <p>This function works fine but I find it's not easy to read. I think there are some best practices about this kind of case to make it more readable. Are nested matches a bad practice (like callback hell in JS) and if so, how to avoid it?</p>