title: rust cvs: invalid enum value
body: <p>I am trying to use rust <a href="https://docs.rs/csv/1.1.6/csv/cookbook/index.html" rel="nofollow noreferrer">csv</a> crate to deserialize simple csv string into the rust struct:</p>
  <pre><code>use serde::Deserialize;
  use stringreader::StringReader;
  
  #[derive(Debug, Deserialize)]
  enum MatchOutcomeCSV {
      win,
      loss,
      draw,
  }
  
  #[derive(Debug, Deserialize)]
  struct MatchResultCSV {
      team1: String,
      team2: String,
      status: MatchOutcomeCSV,
  }
  </code></pre>
  <p>However when I try to deserialize simple input string <code>&quot;Allegoric Alaskans;Blithering Badgers;win&quot;</code> I get the following error from deserialization:</p>
  <pre><code>(invalid enum value) 0
  </code></pre>
  <p>For deserialization I use the following code:</p>
  <pre><code>ReaderBuilder::new()
    .delimiter(b';')
    .has_headers(false)
    .from_reader(StringReader::new(match_results))
    .deserialize()
    .map(|x| x.unwrap())
    .into_iter()
    .collect()
  </code></pre>
  <p>I wonder what is the issue and how can one properly parse the struct I have above?</p>
  <p><strong>Edit</strong>:</p>
  <p>Included my <code>Cargo.toml</code> for clarification around <code>stringreader</code> package:</p>
  <pre><code>[dependencies]
  serde = { version = &quot;1&quot;, features = [&quot;derive&quot;] }
  csv = &quot;1.1&quot;
  stringreader = &quot;0.1.1&quot;
  </code></pre>