mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer-rs.git
synced 2024-11-29 04:51:09 +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")]
|
#[doc(alias = "get_element_class")]
|
||||||
#[inline]
|
#[inline]
|
||||||
fn element_class(&self) -> &glib::Class<Element> {
|
fn element_class(&self) -> &glib::Class<Element> {
|
||||||
unsafe {
|
unsafe { self.unsafe_cast_ref::<Element>().class() }
|
||||||
let klass = (*(self.as_ptr() as *mut glib::gobject_ffi::GTypeInstance)).g_class
|
|
||||||
as *const glib::Class<Element>;
|
|
||||||
&*klass
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#[doc(alias = "get_current_state")]
|
#[doc(alias = "get_current_state")]
|
||||||
|
|
Loading…
Reference in a new issue