Skip to content

Commit 2780dc0

Browse files
committed
Use Self instead of RingBuffer<T>
1 parent f72446c commit 2780dc0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ impl<T> RingBuffer<T> {
151151
// Create a (fat) pointer to a slice ...
152152
let ptr: *mut [T] = core::ptr::slice_from_raw_parts_mut(ptr.cast::<T>(), capacity);
153153
// ... and coerce it into our own dynamically sized type:
154-
let ptr = ptr as *mut RingBuffer<T>;
154+
let ptr = ptr as *mut Self;
155155
// Safety: Null check has been done above
156156
NonNull::new_unchecked(ptr)
157157
};

0 commit comments

Comments
 (0)