mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer-rs.git
synced 2024-12-28 19:10:34 +00:00
gstreamer: Get rid of some unnecessary unsafe API usage
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1157>
This commit is contained in:
parent
0bc16c65f0
commit
b5fcbc9657
1 changed files with 2 additions and 2 deletions
|
@ -472,7 +472,7 @@ impl StructureRef {
|
|||
|
||||
#[doc(alias = "gst_structure_set")]
|
||||
pub fn set(&mut self, name: &str, value: impl Into<glib::Value> + 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<glib::Value> + 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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue