forked from mirrors/gstreamer-rs
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 {
|
||||
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
|
||||
|
|
Loading…
Reference in a new issue