title: How to match Strings in Rust
body: <p>I tried to match <code>String</code>s in Rust lang but I can't:</p>
  
  <pre><code>for (key, value) in obj.iter() {
      let valueType = match Some(value.to_string()) {
          Some(ref x) if x == "some_value" =&gt; string_gen(),
          _ =&gt; "test".to_string()
      };
      println!("{}", value);
      println!("{}", valueType);
  }
  </code></pre>
  
  <p>I have to match the word "some_value" when the value of the iterator is "some_value"</p>
  
  <p>I did a lot of searches and have a lot of people with the same problems.</p>