workspace: move crates under crates
This commit is contained in:
parent
0016bc8cf0
commit
6393fdf3c0
354 changed files with 102 additions and 102 deletions
|
|
@ -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 }
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue