From b243c65accd837ccb8419a1fa0ae0ae8fe1ae647 Mon Sep 17 00:00:00 2001 From: Matt Corallo Date: Mon, 4 Jan 2021 15:25:23 -0500 Subject: [PATCH] [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)]`. --- lightning-c-bindings/src/c_types/mod.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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)] -- 2.39.5