From f94028b8df80239b0c69dce4cfbdc409c2d6d5e7 Mon Sep 17 00:00:00 2001 From: whitequark Date: Sat, 4 Feb 2017 16:23:18 +0000 Subject: [PATCH] Fix c39394b. --- artiq/test/libartiq_support/lib.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/artiq/test/libartiq_support/lib.rs b/artiq/test/libartiq_support/lib.rs index 7dba1b7b8..8fc08a0ac 100644 --- a/artiq/test/libartiq_support/lib.rs +++ b/artiq/test/libartiq_support/lib.rs @@ -21,6 +21,12 @@ mod cslice { phantom: PhantomData<&'a ()> } + impl<'a, T> CSlice<'a, T> { + pub fn len(&self) -> usize { + self.len as usize + } + } + impl<'a, T> AsRef<[T]> for CSlice<'a, T> { fn as_ref(&self) -> &[T] { unsafe {