Remove ModelPtr from the interpreter

Instead stick a straight `Rc<dyn ...>` into the `Value` enum
This commit is contained in:
Simon Hausmann 2021-03-15 14:43:01 +01:00
parent c9ef9c93d8
commit c2c3e00cd7
3 changed files with 44 additions and 20 deletions

View file

@ -201,7 +201,7 @@ fn to_eval_value<'cx>(
obj.get(cx, "rowCount")?.downcast_or_throw::<JsFunction, _>(cx)?;
obj.get(cx, "rowData")?.downcast_or_throw::<JsFunction, _>(cx)?;
let m = js_model::JsModel::new(obj, *a, cx, persistent_context)?;
Ok(Value::Model(sixtyfps_interpreter::ModelPtr(m)))
Ok(Value::Model(m))
}
},
Type::Image => {