From 5589d5221ff2becbc10d236e55b3b3eb1df3dc19 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Wed, 11 Oct 2017 15:30:55 +0300 Subject: [PATCH] Revert "Don't require &mut self for GstRc::get_mut()" This reverts commit 4b77c18b5b215f710b7494db4d19fa67a84e8d35. It unfortunately allows to get multiple mutable references to the same underlying data, which is not allowed. --- gstreamer/src/miniobject.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gstreamer/src/miniobject.rs b/gstreamer/src/miniobject.rs index 7bdbbcce1..931fd7469 100644 --- a/gstreamer/src/miniobject.rs +++ b/gstreamer/src/miniobject.rs @@ -76,7 +76,7 @@ impl GstRc { } } - pub fn get_mut(&self) -> Option<&mut T> { + pub fn get_mut(&mut self) -> Option<&mut T> { if self.is_writable() { Some(unsafe { &mut *self.obj }) } else {