use cfg! instead of #[cfg] and use semver

This commit is contained in:
Riccardo Casatta
2021-06-21 13:56:09 +02:00
parent f4ecfa0d49
commit 2ecae348ea
2 changed files with 2 additions and 5 deletions

View File

@@ -26,10 +26,7 @@ impl TestClient {
debug!("launching {} and {}", &bitcoind_exe, &electrs_exe);
let bitcoind = BitcoinD::new(bitcoind_exe).unwrap();
#[cfg(feature = "test-esplora")]
let http_enabled = true;
#[cfg(not(feature = "test-esplora"))]
let http_enabled = false;
let http_enabled = cfg!(feature = "test-esplora");
let electrsd = ElectrsD::new(electrs_exe, &bitcoind, false, http_enabled).unwrap();