Skip to content

Commit

Permalink
Remove deref_view and deref_view_mut
Browse files Browse the repository at this point in the history
  • Loading branch information
jturner314 committed Nov 19, 2018
1 parent d2daef9 commit 5fa14f0
Showing 1 changed file with 0 additions and 30 deletions.
30 changes: 0 additions & 30 deletions src/impl_raw_views.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 5fa14f0

Please sign in to comment.