rusticl/mesa: convert pointer to ref without transmute in PipeScreen::from_raw

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38807>
This commit is contained in:
Karol Herbst 2025-10-02 17:20:08 +02:00 committed by Eric Engestrom
parent 7cae6d997d
commit 5dbfa7f85d

View file

@ -189,7 +189,7 @@ impl PipeScreen {
}
pub(super) fn from_raw<'s>(screen: &'s *mut pipe_screen) -> &'s Self {
unsafe { mem::transmute(*screen) }
unsafe { &*(*screen).cast() }
}
pub fn caps(&self) -> &pipe_caps {