1
0
Fork 0

Update Vizia param base for upstream changes

This commit is contained in:
Robbert van der Helm 2023-11-14 22:47:00 +01:00
parent eb70aa2892
commit 3a0f3140b8

View file

@ -42,14 +42,19 @@ where
FMap: Fn(&Params) -> &P + Copy + 'static,
{
fn clone(&self) -> Self {
Self {
param: self.param,
params: self.params.clone(),
params_to_param: self.params_to_param,
}
*self
}
}
impl<L, Params, P, FMap> Copy for ParamWidgetData<L, Params, P, FMap>
where
L: Lens<Target = Params> + Copy,
Params: 'static,
P: Param + 'static,
FMap: Fn(&Params) -> &P + Copy + 'static,
{
}
impl<L, Params, P, FMap> ParamWidgetData<L, Params, P, FMap>
where
L: Lens<Target = Params> + Clone,
@ -72,7 +77,7 @@ where
{
let params_to_param = self.params_to_param;
self.params.clone().map(move |params| {
self.params.map(move |params| {
let param = params_to_param(params);
f(param)
})
@ -136,7 +141,6 @@ impl ParamWidgetBase {
// outlive the editor
let param: &P = unsafe {
&*params
.clone()
.map(move |params| params_to_param(params) as *const P)
.get(cx)
};