From 5dbfa7f85d80b937e1488359868b70098a4452d1 Mon Sep 17 00:00:00 2001 From: Karol Herbst Date: Thu, 2 Oct 2025 17:20:08 +0200 Subject: [PATCH] rusticl/mesa: convert pointer to ref without transmute in PipeScreen::from_raw Part-of: --- src/gallium/frontends/rusticl/mesa/pipe/screen.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gallium/frontends/rusticl/mesa/pipe/screen.rs b/src/gallium/frontends/rusticl/mesa/pipe/screen.rs index 7b79535f21f..f504bb52eda 100644 --- a/src/gallium/frontends/rusticl/mesa/pipe/screen.rs +++ b/src/gallium/frontends/rusticl/mesa/pipe/screen.rs @@ -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 {