1
0
Fork 0
forked from wry/wry

all: split reusable components into workspace crates

This commit is contained in:
kossLAN 2026-05-29 09:14:53 -04:00
parent 2a079ed800
commit 657e7ce2f7
No known key found for this signature in database
225 changed files with 7422 additions and 17602 deletions

View file

@ -1,28 +0,0 @@
pub trait PtrExt<T: ?Sized> {
unsafe fn deref<'a>(self) -> &'a T;
}
pub trait MutPtrExt<T: ?Sized> {
unsafe fn deref_mut<'a>(self) -> &'a mut T;
}
impl<T: ?Sized> PtrExt<T> for *const T {
#[inline(always)]
unsafe fn deref<'a>(self) -> &'a T {
unsafe { &*self }
}
}
impl<T: ?Sized> PtrExt<T> for *mut T {
#[inline(always)]
unsafe fn deref<'a>(self) -> &'a T {
unsafe { &*self }
}
}
impl<T: ?Sized> MutPtrExt<T> for *mut T {
#[inline(always)]
unsafe fn deref_mut<'a>(self) -> &'a mut T {
unsafe { &mut *self }
}
}