Gate explicit panic for lack of bindable addresses behind expectation

This commit is contained in:
James 2018-08-04 17:05:46 +10:00
parent 518565f422
commit 4d3ce45dc4

View File

@ -126,10 +126,7 @@ fn main() {
servers.push(server); servers.push(server);
} }
let http_address = match http_address { let http_address = http_address.log_expect("No HTTP address found");
Some(v) => v,
None => panic!("No HTTP address found"),
};
let http_address = format!("http://localhost:{}", http_address.port()); let http_address = format!("http://localhost:{}", http_address.port());