From b5fcbc96578934aff13f499c1d553074c8e4346c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Sun, 27 Nov 2022 00:54:12 +0200 Subject: [PATCH] gstreamer: Get rid of some unnecessary unsafe API usage Part-of: --- gstreamer/src/structure.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gstreamer/src/structure.rs b/gstreamer/src/structure.rs index 1f43a3022..ba5c2b650 100644 --- a/gstreamer/src/structure.rs +++ b/gstreamer/src/structure.rs @@ -472,7 +472,7 @@ impl StructureRef { #[doc(alias = "gst_structure_set")] pub fn set(&mut self, name: &str, value: impl Into + Send) { - let value = unsafe { glib::SendValue::unsafe_from(value.into().into_raw()) }; + let value = glib::SendValue::from_owned(value); self.set_value(name, value); } @@ -489,7 +489,7 @@ impl StructureRef { #[doc(alias = "gst_structure_id_set")] pub fn set_by_quark(&mut self, name: glib::Quark, value: impl Into + Send) { - let value = unsafe { glib::SendValue::unsafe_from(value.into().into_raw()) }; + let value = glib::SendValue::from_owned(value); self.set_value_by_quark(name, value); }