From: Matt Corallo Date: Mon, 4 Jan 2021 20:25:23 +0000 (-0500) Subject: [bindings] Allow unused fns that the bindings can call but don't X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=commitdiff_plain;h=d335cfc880eaa165c48e2a17da7d62f485f3639a;p=rust-lightning [bindings] Allow unused fns that the bindings can call but don't We no longer have any public `Option` 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)]`. --- diff --git a/lightning-c-bindings/src/c_types/mod.rs b/lightning-c-bindings/src/c_types/mod.rs index 0e41b64b0..20c49a6d9 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)]