title: Conversion from Option<&str> to Option<String>
body: <p>What is the best practice to convert <code>Option&lt;&amp;str&gt;</code> to <code>Option&lt;String&gt;</code>? Strictly speaking I'm looking for a concise equivalent of:</p>
  
  
  
  <pre class="lang-rust prettyprint-override"><code>if s.is_some() {
      Some(s.to_string())
  } else {
      None
  }
  </code></pre>
  
  <p>and this is the best I could come up with:</p>
  
  <pre class="lang-rust prettyprint-override"><code>s.and_then(|s| Some(s.to_string()))
  </code></pre>