From 5fa14f06d447456dc2f79680cdccee053fb08b54 Mon Sep 17 00:00:00 2001 From: Jim Turner Date: Mon, 19 Nov 2018 02:12:20 -0500 Subject: [PATCH] Remove deref_view and deref_view_mut --- src/impl_raw_views.rs | 30 ------------------------------ 1 file changed, 30 deletions(-) diff --git a/src/impl_raw_views.rs b/src/impl_raw_views.rs index 9fbb4a414..9adb75b42 100644 --- a/src/impl_raw_views.rs +++ b/src/impl_raw_views.rs @@ -68,16 +68,6 @@ where RawArrayView::new_(ptr, dim, strides) } - /// Return a read-only view of the array. - /// - /// **Warning** from a safety standpoint, this is equivalent to - /// dereferencing a raw pointer for every element in the array. You must - /// ensure that all of the data is valid and choose the correct lifetime. - #[inline] - pub unsafe fn deref_view<'a>(&self) -> ArrayView<'a, A, D> { - ArrayView::new_(self.ptr, self.dim.clone(), self.strides.clone()) - } - /// Converts to a read-only view of the array. /// /// **Warning** from a safety standpoint, this is equivalent to @@ -188,26 +178,6 @@ where unsafe { RawArrayView::new_(self.ptr, self.dim, self.strides) } } - /// Return a read-only view of the array - /// - /// **Warning** from a safety standpoint, this is equivalent to - /// dereferencing a raw pointer for every element in the array. You must - /// ensure that all of the data is valid and choose the correct lifetime. - #[inline] - pub unsafe fn deref_view<'a>(&self) -> ArrayView<'a, A, D> { - ArrayView::new_(self.ptr, self.dim.clone(), self.strides.clone()) - } - - /// Return a read-write view of the array - /// - /// **Warning** from a safety standpoint, this is equivalent to - /// dereferencing a raw pointer for every element in the array. You must - /// ensure that all of the data is valid and choose the correct lifetime. - #[inline] - pub unsafe fn deref_view_mut<'a>(&mut self) -> ArrayViewMut<'a, A, D> { - ArrayViewMut::new_(self.ptr, self.dim.clone(), self.strides.clone()) - } - /// Converts to a read-only view of the array. /// /// **Warning** from a safety standpoint, this is equivalent to