Skip to content

Commit e858fdc

Browse files
committed
Feat: delete as_ptr and as_mut_ptr on DeviceSlice
1 parent 799d79b commit e858fdc

File tree

1 file changed

+0
-24
lines changed

1 file changed

+0
-24
lines changed

crates/cust/src/memory/device/device_slice.rs

-24
Original file line numberDiff line numberDiff line change
@@ -151,30 +151,6 @@ impl<T: DeviceCopy> DeviceSlice<T> {
151151
}
152152
*/
153153

154-
/// Returns a `DevicePointer<T>` to the buffer.
155-
///
156-
/// The caller must ensure that the buffer outlives the returned pointer, or it will end up
157-
/// pointing to garbage.
158-
///
159-
/// Modifying `DeviceBuffer` is guaranteed not to cause its buffer to be reallocated, so pointers
160-
/// cannot be invalidated in that manner, but other types may be added in the future which can
161-
/// reallocate.
162-
pub fn as_ptr(&self) -> DevicePointer<T> {
163-
self.ptr
164-
}
165-
166-
/// Returns a `DevicePointer<T>` to the buffer.
167-
///
168-
/// The caller must ensure that the buffer outlives the returned pointer, or it will end up
169-
/// pointing to garbage.
170-
///
171-
/// Modifying `DeviceBuffer` is guaranteed not to cause its buffer to be reallocated, so pointers
172-
/// cannot be invalidated in that manner, but other types may be added in the future which can
173-
/// reallocate.
174-
pub fn as_mut_ptr(&mut self) -> DevicePointer<T> {
175-
self.ptr
176-
}
177-
178154
/// Forms a slice from a `DevicePointer` and a length.
179155
///
180156
/// The `len` argument is the number of _elements_, not the number of bytes.

0 commit comments

Comments
 (0)