]> Untitled Git - bdk/commitdiff
Remove testutils feature so doctests worka again
authorLLFourn <lloyd.fourn@gmail.com>
Wed, 19 May 2021 06:09:01 +0000 (16:09 +1000)
committerLLFourn <lloyd.fourn@gmail.com>
Wed, 19 May 2021 06:45:48 +0000 (16:45 +1000)
I wanted to only conditionally compile testutils but it's needed in
doctests which we can't conditionally compile for:

https://github.com/rust-lang/rust/issues/67295

Cargo.toml
src/database/memory.rs
src/lib.rs

index dda3121605770509d4af2a6b360abf2868c74132..78ddb1162abca4467650b72451340c21a14d92bb 100644 (file)
@@ -58,8 +58,7 @@ all-keys = ["keys-bip39"]
 keys-bip39 = ["tiny-bip39"]
 
 # Debug/Test features
-testutils = []
-test-blockchains = ["testutils", "bitcoincore-rpc", "electrum-client"]
+test-blockchains = ["bitcoincore-rpc", "electrum-client"]
 test-md-docs = ["electrum"]
 
 [dev-dependencies]
index 465698d535009674389325ec27db9ee20d9b0b43..adf4e20f34a905d3eacc94e54ce018480c81b9c6 100644 (file)
@@ -511,7 +511,7 @@ macro_rules! doctest_wallet {
     () => {{
         use $crate::bitcoin::Network;
         use $crate::database::MemoryDatabase;
-        use testutils::testutils;
+        use $crate::testutils;
         let descriptor = "wpkh(cVpPVruEDdmutPzisEsYvtST1usBR3ntr8pXSyt6D2YYqXRyPcFW)";
         let descriptors = testutils!(@descriptors (descriptor) (descriptor));
 
index 722f680a85d63fd9e91cac8547f1c61786369e4f..77cbef619edb3fae680e014e899818780183028b 100644 (file)
@@ -262,5 +262,9 @@ pub fn version() -> &'static str {
     env!("CARGO_PKG_VERSION", "unknown")
 }
 
-#[cfg(any(feature = "testutils", test))]
+// We should consider putting this under a feature flag but we need the macro in doctets so we need
+// to wait until https://github.com/rust-lang/rust/issues/67295 is fixed.
+//
+// Stuff in here is too rough to document atm
+#[doc(hidden)]
 pub mod testutils;