Fix a bunch of warnings.

This commit is contained in:
4lDO2
2024-07-08 13:01:25 +02:00
parent c86f107344
commit 5e7db80285
52 changed files with 105 additions and 166 deletions
-3
View File
@@ -16,9 +16,6 @@ unsafe impl<T: ?Sized> Send for Unique<T> {}
unsafe impl<T: ?Sized> Sync for Unique<T> {}
impl<T: ?Sized> Unique<T> {
pub fn new(ptr: *mut T) -> Self {
Self(NonNull::new(ptr).expect("Did not expect pointer to be null"))
}
pub unsafe fn new_unchecked(ptr: *mut T) -> Self {
Self(NonNull::new_unchecked(ptr))
}