From dbc76f1053ffde1bf62f27486740a73caa5e5f74 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Tue, 30 Jun 2020 15:23:50 +0300 Subject: [PATCH] gstreamer/miniobject: Remove DerefMut and AsMut impls They were side-stepping the miniobject writability mechanism. --- gstreamer/src/miniobject.rs | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/gstreamer/src/miniobject.rs b/gstreamer/src/miniobject.rs index a750e8bbc..39a41d0d2 100644 --- a/gstreamer/src/miniobject.rs +++ b/gstreamer/src/miniobject.rs @@ -115,24 +115,12 @@ macro_rules! gst_define_mini_object_wrapper( } } - impl ::std::ops::DerefMut for $name { - fn deref_mut(&mut self) -> &mut Self::Target { - unsafe { &mut *(self.obj.as_ptr() as *mut Self::Target) } - } - } - impl AsRef<$ref_name> for $name { fn as_ref(&self) -> &$ref_name { &*self } } - impl AsMut<$ref_name> for $name { - fn as_mut(&mut self) -> &mut $ref_name { - &mut *self - } - } - impl ::std::borrow::Borrow<$ref_name> for $name { fn borrow(&self) -> &$ref_name { &*self