Sweep panickers from IO and network (#3018)

* Sweep panickers from IO and network

* Typo and logging
This commit is contained in:
Arkadiy Paronyan
2016-10-31 19:58:47 +01:00
committed by GitHub
parent 60df9857ce
commit 2e70abdc40
7 changed files with 60 additions and 49 deletions

View File

@@ -280,7 +280,7 @@ impl NodeTable {
json.push_str("\"nodes\": [\n");
let node_ids = self.nodes(AllowIP::All);
for i in 0 .. node_ids.len() {
let node = self.nodes.get(&node_ids[i]).unwrap();
let node = self.nodes.get(&node_ids[i]).expect("self.nodes() only returns node IDs from self.nodes");
json.push_str(&format!("\t{{ \"url\": \"{}\", \"failures\": {} }}{}\n", node, node.failures, if i == node_ids.len() - 1 {""} else {","}))
}
json.push_str("]\n");