mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer-rs.git
synced 2025-04-27 15:34:51 +00:00
gstreamer/miniobject: Remove DerefMut and AsMut impls
They were side-stepping the miniobject writability mechanism.
This commit is contained in:
parent
911bb34dc2
commit
dbc76f1053
1 changed files with 0 additions and 12 deletions
|
@ -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 {
|
impl AsRef<$ref_name> for $name {
|
||||||
fn as_ref(&self) -> &$ref_name {
|
fn as_ref(&self) -> &$ref_name {
|
||||||
&*self
|
&*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 {
|
impl ::std::borrow::Borrow<$ref_name> for $name {
|
||||||
fn borrow(&self) -> &$ref_name {
|
fn borrow(&self) -> &$ref_name {
|
||||||
&*self
|
&*self
|
||||||
|
|
Loading…
Reference in a new issue