diff --git a/gstreamer-app/src/app_sink.rs b/gstreamer-app/src/app_sink.rs index 76470e665..b84285990 100644 --- a/gstreamer-app/src/app_sink.rs +++ b/gstreamer-app/src/app_sink.rs @@ -169,9 +169,7 @@ unsafe extern "C" fn trampoline_eos(appsink: *mut ffi::GstAppSink, callbacks: gp } if let Some(ref eos) = callbacks.eos { - let result = panic::catch_unwind(panic::AssertUnwindSafe(|| { - (&mut *eos.borrow_mut())(&element) - })); + let result = panic::catch_unwind(panic::AssertUnwindSafe(|| (*eos.borrow_mut())(&element))); match result { Ok(result) => result, Err(err) => { @@ -197,7 +195,7 @@ unsafe extern "C" fn trampoline_new_preroll( let ret = if let Some(ref new_preroll) = callbacks.new_preroll { let result = panic::catch_unwind(panic::AssertUnwindSafe(|| { - (&mut *new_preroll.borrow_mut())(&element).into() + (*new_preroll.borrow_mut())(&element).into() })); match result { Ok(result) => result, @@ -230,7 +228,7 @@ unsafe extern "C" fn trampoline_new_sample( let ret = if let Some(ref new_sample) = callbacks.new_sample { let result = panic::catch_unwind(panic::AssertUnwindSafe(|| { - (&mut *new_sample.borrow_mut())(&element).into() + (*new_sample.borrow_mut())(&element).into() })); match result { Ok(result) => result, @@ -263,7 +261,7 @@ unsafe extern "C" fn trampoline_new_event( let ret = if let Some(ref new_event) = callbacks.new_event { let result = panic::catch_unwind(panic::AssertUnwindSafe(|| { - (&mut *new_event.borrow_mut())(&element) + (*new_event.borrow_mut())(&element) })); match result { Ok(result) => result, diff --git a/gstreamer-app/src/app_src.rs b/gstreamer-app/src/app_src.rs index 58e78e142..b9e2c99ae 100644 --- a/gstreamer-app/src/app_src.rs +++ b/gstreamer-app/src/app_src.rs @@ -137,7 +137,7 @@ unsafe extern "C" fn trampoline_need_data( if let Some(ref need_data) = callbacks.need_data { let result = panic::catch_unwind(panic::AssertUnwindSafe(|| { - (&mut *need_data.borrow_mut())(&element, length) + (*need_data.borrow_mut())(&element, length) })); match result { Ok(result) => result, diff --git a/gstreamer-rtsp-server/src/rtsp_session_pool.rs b/gstreamer-rtsp-server/src/rtsp_session_pool.rs index 8e2a6783f..403853d56 100644 --- a/gstreamer-rtsp-server/src/rtsp_session_pool.rs +++ b/gstreamer-rtsp-server/src/rtsp_session_pool.rs @@ -13,7 +13,7 @@ unsafe extern "C" fn trampoline_watch Continue + S func: gpointer, ) -> gboolean { let func: &RefCell = &*(func as *const RefCell); - (&mut *func.borrow_mut())(&from_glib_borrow(pool)).into_glib() + (*func.borrow_mut())(&from_glib_borrow(pool)).into_glib() } unsafe extern "C" fn destroy_closure_watch< diff --git a/gstreamer/src/bus.rs b/gstreamer/src/bus.rs index 579eb9c0c..4ad3ec83b 100644 --- a/gstreamer/src/bus.rs +++ b/gstreamer/src/bus.rs @@ -24,7 +24,7 @@ unsafe extern "C" fn trampoline_watch Continue + Sen func: gpointer, ) -> gboolean { let func: &RefCell = &*(func as *const RefCell); - (&mut *func.borrow_mut())(&from_glib_borrow(bus), &Message::from_glib_borrow(msg)).into_glib() + (*func.borrow_mut())(&from_glib_borrow(bus), &Message::from_glib_borrow(msg)).into_glib() } unsafe extern "C" fn destroy_closure_watch< @@ -48,7 +48,7 @@ unsafe extern "C" fn trampoline_watch_local Continue ) -> gboolean { let func: &glib::thread_guard::ThreadGuard> = &*(func as *const glib::thread_guard::ThreadGuard>); - (&mut *func.get_ref().borrow_mut())(&from_glib_borrow(bus), &Message::from_glib_borrow(msg)) + (*func.get_ref().borrow_mut())(&from_glib_borrow(bus), &Message::from_glib_borrow(msg)) .into_glib() } diff --git a/gstreamer/src/pad.rs b/gstreamer/src/pad.rs index 6abf743dc..1be11836f 100644 --- a/gstreamer/src/pad.rs +++ b/gstreamer/src/pad.rs @@ -1598,7 +1598,7 @@ unsafe extern "C" fn destroy_closure(ptr: gpointer) { unsafe extern "C" fn trampoline_pad_task(func: gpointer) { let func: &RefCell = &*(func as *const RefCell); - (&mut *func.borrow_mut())() + (*func.borrow_mut())() } fn into_raw_pad_task(func: F) -> gpointer {