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

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

View file

@ -473,7 +473,7 @@ impl<'a, T, U> MetaRefMut<'a, T, U> {
}
#[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>) }
}