From: Matt Corallo Date: Fri, 2 Oct 2020 02:20:48 +0000 (-0400) Subject: Drop the now-unused usizeslice bindings struct X-Git-Tag: v0.0.12~7^2~7 X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=commitdiff_plain;h=353e29aedd2227a1a3a6811df1d73606f63a687e;p=rust-lightning Drop the now-unused usizeslice bindings struct --- diff --git a/lightning-c-bindings/src/c_types/mod.rs b/lightning-c-bindings/src/c_types/mod.rs index 4fc325f08..813e401b8 100644 --- a/lightning-c-bindings/src/c_types/mod.rs +++ b/lightning-c-bindings/src/c_types/mod.rs @@ -173,24 +173,6 @@ impl u8slice { } } -#[repr(C)] -pub struct usizeslice { - pub data: *const usize, - pub datalen: usize -} -impl usizeslice { - pub(crate) fn from_slice(s: &[usize]) -> Self { - Self { - data: s.as_ptr(), - datalen: s.len(), - } - } - pub(crate) fn to_slice(&self) -> &[usize] { - if self.datalen == 0 { return &[]; } - unsafe { std::slice::from_raw_parts(self.data, self.datalen) } - } -} - #[repr(C)] #[derive(Copy, Clone)] /// Arbitrary 32 bytes, which could represent one of a few different things. You probably want to