News for hackers. Stuff that matters.
Re:My Struggles with Rust by huntie on Sunday May 07, 2017 @12:22PM (#14286154)
It might be easier to do:

  let config: HashMap<String, String> = serde_json::from_reader(file)
      .expect("config has invalid json");
This means that you can just do

  let jenkins_server = config.get("jenkins_server")
      .expect("jenkins_server key not in config");

There are no comments on this comment yet.