mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer-rs.git
synced 2024-11-25 11:01:10 +00:00
gstreamer: Simplify Element::element_class()
implementation a bit
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1322>
This commit is contained in:
parent
3f16233a01
commit
547cfb44e2
1 changed files with 1 additions and 5 deletions
|
@ -110,11 +110,7 @@ pub trait ElementExtManual: sealed::Sealed + IsA<Element> + 'static {
|
|||
#[doc(alias = "get_element_class")]
|
||||
#[inline]
|
||||
fn element_class(&self) -> &glib::Class<Element> {
|
||||
unsafe {
|
||||
let klass = (*(self.as_ptr() as *mut glib::gobject_ffi::GTypeInstance)).g_class
|
||||
as *const glib::Class<Element>;
|
||||
&*klass
|
||||
}
|
||||
unsafe { self.unsafe_cast_ref::<Element>().class() }
|
||||
}
|
||||
|
||||
#[doc(alias = "get_current_state")]
|
||||
|
|
Loading…
Reference in a new issue