mirror of
https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs.git
synced 2025-01-02 23:38:45 +00:00
Remove some unneeded trait bounds in the taglist bindings
This commit is contained in:
parent
1bf20bfea4
commit
e45ff7241e
1 changed files with 2 additions and 4 deletions
|
@ -93,10 +93,10 @@ impl TagList {
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn add<'a, T: Tag<'a>>(&mut self, value: T::TagType, mode: MergeMode)
|
pub fn add<'a, T: Tag<'a>>(&mut self, value: T::TagType, mode: MergeMode)
|
||||||
where Value: From<<T as Tag<'a>>::TagType>
|
where T::TagType: Into<Value>
|
||||||
{
|
{
|
||||||
unsafe {
|
unsafe {
|
||||||
let v = Value::from(value);
|
let v = value.into();
|
||||||
let mut gvalue = v.into_raw();
|
let mut gvalue = v.into_raw();
|
||||||
let tag_name = CString::new(T::tag_name()).unwrap();
|
let tag_name = CString::new(T::tag_name()).unwrap();
|
||||||
|
|
||||||
|
@ -107,7 +107,6 @@ impl TagList {
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn get<'a, T: Tag<'a>>(&self) -> Option<TypedValue<T::TagType>>
|
pub fn get<'a, T: Tag<'a>>(&self) -> Option<TypedValue<T::TagType>>
|
||||||
where Value: From<<T as Tag<'a>>::TagType>
|
|
||||||
{
|
{
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut gvalue = mem::zeroed();
|
let mut gvalue = mem::zeroed();
|
||||||
|
@ -129,7 +128,6 @@ impl TagList {
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn get_index<'a, T: Tag<'a>>(&'a self, idx: u32) -> Option<TypedValueRef<'a, T::TagType>>
|
pub fn get_index<'a, T: Tag<'a>>(&'a self, idx: u32) -> Option<TypedValueRef<'a, T::TagType>>
|
||||||
where Value: From<<T as Tag<'a>>::TagType>
|
|
||||||
{
|
{
|
||||||
unsafe {
|
unsafe {
|
||||||
let tag_name = CString::new(T::tag_name()).unwrap();
|
let tag_name = CString::new(T::tag_name()).unwrap();
|
||||||
|
|
Loading…
Reference in a new issue