File tree Expand file tree Collapse file tree 4 files changed +13
-12
lines changed Expand file tree Collapse file tree 4 files changed +13
-12
lines changed Original file line number Diff line number Diff line change @@ -9,13 +9,14 @@ crate-type=["staticlib", "cdylib"]
9
9
10
10
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
11
11
12
- [features ]
13
- debug_assertions = [" hex" ]
14
-
15
12
[dependencies ]
16
13
lightning = { path = " ../lightning" }
17
14
secp256k1 = " 0.15"
18
15
bitcoin = " 0.21"
19
16
bitcoin_hashes = " 0.7"
20
- hex = { version = " 0.3" , optional = true }
17
+ # We want to include this only for debug build, but following line does not work.
18
+ # [target.'cfg(debug_assertions)'.dependencies]
19
+ # see https://github.com/rust-lang/cargo/issues/7634
20
+ # as a workaround, we just included it as an usual dependency
21
+ hex = " 0.3"
21
22
Original file line number Diff line number Diff line change @@ -13,20 +13,20 @@ use crate::error::FFIResult;
13
13
14
14
pub type FFIBroadCasterHandle < ' a > = HandleShared < ' a , FFIBroadCaster > ;
15
15
16
- #[ cfg( feature = " debug_assertions" ) ]
16
+ #[ cfg( debug_assertions) ]
17
17
#[ repr( C ) ]
18
18
pub struct BroadcasterWrapper {
19
19
broadcaster : Arc < FFIBroadCaster > ,
20
20
}
21
21
22
- #[ cfg( feature = " debug_assertions" ) ]
22
+ #[ cfg( debug_assertions) ]
23
23
impl BroadcasterWrapper {
24
24
pub fn broadcast ( & self , tx : & Transaction ) {
25
25
self . broadcaster . as_ref ( ) . broadcast_transaction ( & tx)
26
26
}
27
27
}
28
28
29
- #[ cfg( feature = " debug_assertions" ) ]
29
+ #[ cfg( debug_assertions) ]
30
30
type BroadcasterWrapperHandle < ' a > = HandleShared < ' a , BroadcasterWrapper > ;
31
31
32
32
46
46
}
47
47
48
48
/// Useful for testing low-level interoperability.
49
- #[ cfg( feature = " debug_assertions" ) ]
49
+ #[ cfg( debug_assertions) ]
50
50
ffi ! {
51
51
fn ffi_test_broadcaster( broadcaster_ptr: FFIBroadCasterHandle ) -> FFIResult {
52
52
let broadcaster = unsafe_block!( "" => broadcaster_ptr. as_ref( ) ) ;
77
77
} ) )
78
78
}
79
79
80
- }
80
+ }
Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ extern crate bitcoin_hashes;
10
10
extern crate lightning;
11
11
extern crate secp256k1;
12
12
13
- #[ cfg( feature = " debug_assertions" ) ]
13
+ #[ cfg( debug_assertions) ]
14
14
extern crate hex;
15
15
16
16
#[ macro_use]
@@ -35,7 +35,7 @@ mod channelmanager;
35
35
mod error;
36
36
mod handle;
37
37
38
- #[ cfg( feature = " debug_assertions" ) ]
38
+ #[ cfg( debug_assertions) ]
39
39
mod ffi_test_utils;
40
40
41
41
pub use handle:: * ;
Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ use lightning::util::logger::{Record, Level};
23
23
24
24
use std:: fmt:: Arguments ;
25
25
/// Useful for testing low-level interoperability.
26
- #[ cfg( feature = " debug_assertions" ) ]
26
+ #[ cfg( debug_assertions) ]
27
27
ffi ! {
28
28
fn test_logger( handle: FFILoggerHandle ) -> FFIResult {
29
29
let logger: & FFILogger = unsafe_block!( "" => handle. as_ref( ) ) ;
You can’t perform that action at this time.
0 commit comments