Drop the now-unused usizeslice bindings struct
authorMatt Corallo <git@bluematt.me>
Fri, 2 Oct 2020 02:20:48 +0000 (22:20 -0400)
committerMatt Corallo <git@bluematt.me>
Wed, 21 Oct 2020 18:50:22 +0000 (14:50 -0400)
lightning-c-bindings/src/c_types/mod.rs

index 4fc325f08e0fb6fdf61417ddcf0942b965015a83..813e401b8e7e2b5f567b8791117c815c02aa0d61 100644 (file)
@@ -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