mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer-rs.git
synced 2024-11-22 01:21:05 +00:00
base/base_transform: Fix minor clippy warning
warning: called `map(f)` on an Option value where `f` is a unit closure --> gstreamer-base/src/subclass/base_transform.rs:683:13 | 683 | / (*parent_class) 684 | | .before_transform 685 | | .map(|f| f(element.to_glib_none().0, inbuf.as_ptr() as *mut _)); | |_______________________________________________________________________________^ | = note: `#[warn(clippy::option_map_unit_fn)]` on by default = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#option_map_unit_fn
This commit is contained in:
parent
09212add47
commit
870978e286
1 changed files with 3 additions and 3 deletions
|
@ -680,9 +680,9 @@ impl<T: BaseTransformImpl + ObjectImpl> BaseTransformImplExt for T {
|
|||
let data = self.get_type_data();
|
||||
let parent_class =
|
||||
data.as_ref().get_parent_class() as *mut gst_base_sys::GstBaseTransformClass;
|
||||
(*parent_class)
|
||||
.before_transform
|
||||
.map(|f| f(element.to_glib_none().0, inbuf.as_ptr() as *mut _));
|
||||
if let Some(ref f) = (*parent_class).before_transform {
|
||||
f(element.to_glib_none().0, inbuf.as_ptr() as *mut _);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue