X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;ds=inline;f=lightning-c-bindings%2Fsrc%2Fc_types%2Fmod.rs;h=dcb8d3078bb84bca61f42ef3a2c50b00b0d0becf;hb=89be6254aea425552bd97e0d0b07ed5932017ca0;hp=0e41b64b00e07d9a822f16f4c5b6b7eda0bd3d3c;hpb=78c2c48ea30e5d933c0a29c5a9e4dea47eeabf04;p=rust-lightning diff --git a/lightning-c-bindings/src/c_types/mod.rs b/lightning-c-bindings/src/c_types/mod.rs index 0e41b64b..dcb8d307 100644 --- a/lightning-c-bindings/src/c_types/mod.rs +++ b/lightning-c-bindings/src/c_types/mod.rs @@ -57,8 +57,9 @@ impl Signature { pub(crate) fn into_rust(&self) -> SecpSignature { SecpSignature::from_compact(&self.compact_form).unwrap() } - pub(crate) fn is_null(&self) -> bool { self.compact_form[..] == [0; 64][..] } - pub(crate) fn null() -> Self { Self { compact_form: [0; 64] } } + // The following are used for Option which we support, but don't use anymore + #[allow(unused)] pub(crate) fn is_null(&self) -> bool { self.compact_form[..] == [0; 64][..] } + #[allow(unused)] pub(crate) fn null() -> Self { Self { compact_form: [0; 64] } } } #[repr(C)] @@ -224,6 +225,9 @@ pub(crate) fn serialize_obj(i: &I) -> derive pub(crate) fn deserialize_obj(s: u8slice) -> Result { I::read(&mut s.to_slice()) } +pub(crate) fn deserialize_obj_arg>(s: u8slice, args: A) -> Result { + I::read(&mut s.to_slice(), args) +} #[repr(C)] #[derive(Copy, Clone)]