X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=c-bindings-gen%2Fsrc%2Ftypes.rs;h=f83c62741074039f8dce268b1df9f9486d0fca5d;hb=92558d410a390f31fcec3b628db0d0d3151bd3a9;hp=1cb7420e7d8c8686c73fed2038fc6fb69113459b;hpb=f7105f5bb3fdf379d58286eacd8e44edba686954;p=ldk-c-bindings diff --git a/c-bindings-gen/src/types.rs b/c-bindings-gen/src/types.rs index 1cb7420..f83c627 100644 --- a/c-bindings-gen/src/types.rs +++ b/c-bindings-gen/src/types.rs @@ -294,6 +294,8 @@ impl<'a, 'p: 'a> GenericTypes<'a, 'p> { if let syn::TypeParamBound::Trait(trait_bound) = bound { if let Some(id) = trait_bound.path.get_ident() { if format!("{}", id) == "Sized" { continue; } + if format!("{}", id) == "Send" { continue; } + if format!("{}", id) == "Sync" { continue; } } if non_lifetimes_processed { return false; } non_lifetimes_processed = true; @@ -1534,7 +1536,7 @@ impl<'a, 'c: 'a> TypeResolver<'a, 'c> { if is_ref => Some(".as_inner()"), "bitcoin::hash_types::Txid"|"bitcoin::BlockHash"|"bitcoin::hash_types::BlockHash"|"bitcoin_hashes::sha256::Hash" if !is_ref => Some(".into_inner() }"), - "bitcoin::blockdata::constants::ChainHash" if is_ref => Some(".as_bytes() }"), + "bitcoin::blockdata::constants::ChainHash" if is_ref => Some(".as_bytes()"), "bitcoin::blockdata::constants::ChainHash" if !is_ref => Some(".to_bytes() }"), "bitcoin::secp256k1::Message" if !is_ref => Some(".as_ref().clone() }"), "lightning::ln::PaymentHash"|"lightning::ln::PaymentPreimage"|"lightning::ln::PaymentSecret"