3 ms·
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
by huntie 9y ago
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");