Closed Mossaka closed 3 years ago
Per discussion with @andylokandy, the CommonTypes enum implementation looks strange and should be deprecated by a trait implementation.
CommonTypes
A proposed solution looks like this:
trait ToJS { fn to_js_value(&mut self, cx: FunctionContext) -> Handle<JsValue>; } impl ToJS for Vec<Key> { pub fn to_js_value(&mut self, cx: FunctionContext) -> Handle<JsValue> { todo!() } }
Per discussion with @andylokandy, the
CommonTypes
enum implementation looks strange and should be deprecated by a trait implementation.A proposed solution looks like this: