File tree 1 file changed +5
-1
lines changed
1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -25,12 +25,14 @@ use std::time::Duration;
25
25
26
26
/// Struct for running a regtest environment with a single `bitcoind` node with an `electrs`
27
27
/// instance connected to it.
28
+ #[ cfg_attr( docsrs, doc( cfg( not( docsrs) ) ) ) ]
28
29
pub struct TestEnv {
29
30
pub bitcoind : electrsd:: bitcoind:: BitcoinD ,
30
31
pub electrsd : electrsd:: ElectrsD ,
31
32
}
32
33
33
34
/// Configuration parameters.
35
+ #[ cfg_attr( docsrs, doc( cfg( not( docsrs) ) ) ) ]
34
36
#[ derive( Debug ) ]
35
37
pub struct Config < ' a > {
36
38
/// [`bitcoind::Conf`]
@@ -39,6 +41,7 @@ pub struct Config<'a> {
39
41
pub electrsd : electrsd:: Conf < ' a > ,
40
42
}
41
43
44
+ #[ cfg( not( docsrs) ) ]
42
45
impl < ' a > Default for Config < ' a > {
43
46
/// Use the default configuration plus set `http_enabled = true` for [`electrsd::Conf`]
44
47
/// which is required for testing `bdk_esplora`.
@@ -54,6 +57,7 @@ impl<'a> Default for Config<'a> {
54
57
}
55
58
}
56
59
60
+ #[ cfg( not( docsrs) ) ]
57
61
impl TestEnv {
58
62
/// Construct a new [`TestEnv`] instance with the default configuration used by BDK.
59
63
pub fn new ( ) -> anyhow:: Result < Self > {
@@ -310,7 +314,7 @@ impl TestEnv {
310
314
}
311
315
}
312
316
313
- #[ cfg( test) ]
317
+ #[ cfg( all ( test, not ( docsrs ) ) ) ]
314
318
mod test {
315
319
use crate :: TestEnv ;
316
320
use core:: time:: Duration ;
You can’t perform that action at this time.
0 commit comments