mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer-rs.git
synced 2024-11-22 17:41: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 data = self.get_type_data();
|
||||||
let parent_class =
|
let parent_class =
|
||||||
data.as_ref().get_parent_class() as *mut gst_base_sys::GstBaseTransformClass;
|
data.as_ref().get_parent_class() as *mut gst_base_sys::GstBaseTransformClass;
|
||||||
(*parent_class)
|
if let Some(ref f) = (*parent_class).before_transform {
|
||||||
.before_transform
|
f(element.to_glib_none().0, inbuf.as_ptr() as *mut _);
|
||||||
.map(|f| f(element.to_glib_none().0, inbuf.as_ptr() as *mut _));
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue