[bindings] Allow unused fns that the bindings can call but don't
authorMatt Corallo <git@bluematt.me>
Mon, 4 Jan 2021 20:25:23 +0000 (15:25 -0500)
committerMatt Corallo <git@bluematt.me>
Tue, 2 Feb 2021 22:04:31 +0000 (17:04 -0500)
We no longer have any public `Option<Signatures>` in our code, and
thus get warnings that the two functions which support it are
unused. Instead of removing support for them (which we may need in
the future), we add `#[allow(unused)]`.

lightning-c-bindings/src/c_types/mod.rs

index 0e41b64b00e07d9a822f16f4c5b6b7eda0bd3d3c..20c49a6d92b30f0c96ad2ac6e394fbfbbcfa2c31 100644 (file)
@@ -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<Signature> 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)]