This commit is contained in:
numbers
2023-09-19 19:13:55 -04:00
parent a6ba0f3e40
commit 694004ecfa
5 changed files with 9 additions and 17 deletions

View File

@@ -15,6 +15,7 @@ pub unsafe fn slicify_mut<T>(value: &mut T) -> &mut [u8] {
}
/// converts a non mutable reference into a mutable one
#[allow(invalid_reference_casting)]
pub unsafe fn mutify<T>(nr: &T) -> &mut T {
&mut *(nr as *const T as *mut T)
}