meta: Fix MetaRefMut::upcast_mut() to return a mutable reference

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1394>
This commit is contained in:
Sebastian Dröge 2024-02-09 10:24:40 +02:00
parent abbfd490d9
commit e0eab9d19b

View file

@ -473,7 +473,7 @@ impl<'a, T, U> MetaRefMut<'a, T, U> {
} }
#[inline] #[inline]
pub fn upcast_mut(&mut self) -> &MetaRefMut<'a, Meta, U> { pub fn upcast_mut(&mut self) -> &mut MetaRefMut<'a, Meta, U> {
unsafe { &mut *(self as *mut MetaRefMut<'a, T, U> as *mut MetaRefMut<'a, Meta, U>) } unsafe { &mut *(self as *mut MetaRefMut<'a, T, U> as *mut MetaRefMut<'a, Meta, U>) }
} }