forked from M-Labs/artiq
Fix c39394b
.
This commit is contained in:
parent
3eef0bcc1a
commit
f94028b8df
|
@ -21,6 +21,12 @@ mod cslice {
|
||||||
phantom: PhantomData<&'a ()>
|
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> {
|
impl<'a, T> AsRef<[T]> for CSlice<'a, T> {
|
||||||
fn as_ref(&self) -> &[T] {
|
fn as_ref(&self) -> &[T] {
|
||||||
unsafe {
|
unsafe {
|
||||||
|
|
Loading…
Reference in New Issue