diff --git a/packages/fuel-indexer-tests/src/fixtures.rs b/packages/fuel-indexer-tests/src/fixtures.rs index c73a5026f..8d3f86dd9 100644 --- a/packages/fuel-indexer-tests/src/fixtures.rs +++ b/packages/fuel-indexer-tests/src/fixtures.rs @@ -199,15 +199,12 @@ pub async fn setup_test_fuel_node( DEFAULT_COIN_AMOUNT, ); - let addr = host_str - .map(|x| x.parse::()) - .unwrap_or_else(|| { - Ok(derive_socket_addr( - defaults::FUEL_NODE_HOST, - defaults::FUEL_NODE_PORT, - )) - }) - .unwrap(); + let addr = match host_str { + Some(h) => h.parse::().unwrap_or_else(|_| { + derive_socket_addr(defaults::FUEL_NODE_HOST, defaults::FUEL_NODE_PORT) + }), + None => derive_socket_addr(defaults::FUEL_NODE_HOST, defaults::FUEL_NODE_PORT), + }; let config = Config { utxo_validation: false,