File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -77,7 +77,6 @@ pub mod api;
77
77
pub mod r#async;
78
78
#[ cfg( feature = "blocking" ) ]
79
79
pub mod blocking;
80
- #[ cfg( feature = "async" ) ]
81
80
pub mod sleeper;
82
81
83
82
pub use api:: * ;
@@ -1014,25 +1013,25 @@ mod test {
1014
1013
assert_eq ! ( tx, tx_async) ;
1015
1014
}
1016
1015
1017
- #[ cfg( feature = "tokio" ) ]
1016
+ #[ cfg( all ( feature = "async" , feature = " tokio") ) ]
1018
1017
#[ test]
1019
1018
fn use_builder_with_tokio_as_normal ( ) {
1020
1019
let builder = Builder :: new ( "https://blockstream.info/testnet/api" ) ;
1021
1020
let client = builder. build_async ( ) ;
1022
1021
assert ! ( client. is_ok( ) ) ;
1023
1022
}
1024
1023
1025
- #[ cfg( not( feature = "tokio" ) ) ]
1024
+ #[ cfg( all ( feature = "async" , not( feature = "tokio" ) ) ) ]
1026
1025
struct TestRuntime ;
1027
1026
1028
- #[ cfg( not( feature = "tokio" ) ) ]
1027
+ #[ cfg( all ( feature = "async" , not( feature = "tokio" ) ) ) ]
1029
1028
impl Sleeper for TestRuntime {
1030
1029
async fn sleep ( duration : Duration ) {
1031
1030
tokio:: time:: sleep ( duration) . await ;
1032
1031
}
1033
1032
}
1034
1033
1035
- #[ cfg( not( feature = "tokio" ) ) ]
1034
+ #[ cfg( all ( feature = "async" , not( feature = "tokio" ) ) ) ]
1036
1035
#[ test]
1037
1036
fn use_with_custom_runtime ( ) {
1038
1037
let builder =
You can’t perform that action at this time.
0 commit comments