gstreamer: Update for try_from_glib() having become an unsafe function

Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/issues/337
This commit is contained in:
Sebastian Dröge 2021-05-19 11:46:56 +03:00
parent b1088a6d11
commit b02f2acae5

View file

@ -60,9 +60,9 @@ macro_rules! impl_return_result_traits {
impl TryFromGlib<ffi::$ffi_type> for $ok_type { impl TryFromGlib<ffi::$ffi_type> for $ok_type {
type Error = $err_type; type Error = $err_type;
fn try_from_glib(val: ffi::$ffi_type) -> Result<$ok_type, $err_type> { unsafe fn try_from_glib(val: ffi::$ffi_type) -> Result<$ok_type, $err_type> {
skip_assert_initialized!(); skip_assert_initialized!();
unsafe { $ret_type::from_glib(val) }.into_result() $ret_type::from_glib(val).into_result()
} }
} }
}; };