mirror of
https://github.com/logos-blockchain/logos-blockchain-testing.git
synced 2026-01-02 13:23:13 +00:00
core: avoid Url parse expect in topology readiness
This commit is contained in:
parent
5bcdb6a1c9
commit
4da09bfe85
@ -156,8 +156,10 @@ impl GeneratedTopology {
|
|||||||
let client = Client::new();
|
let client = Client::new();
|
||||||
|
|
||||||
let make_testing_base_url = |port: u16| -> Url {
|
let make_testing_base_url = |port: u16| -> Url {
|
||||||
Url::parse(&format!("http://127.0.0.1:{port}/"))
|
Url::parse(&format!("http://127.0.0.1:{port}/")).unwrap_or_else(|_| unsafe {
|
||||||
.expect("failed to construct local testing base url")
|
// Safety: `port` is a valid u16 port.
|
||||||
|
std::hint::unreachable_unchecked()
|
||||||
|
})
|
||||||
};
|
};
|
||||||
|
|
||||||
if endpoints.len() > 1 {
|
if endpoints.len() > 1 {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user