Remove subtyping for () from node graph type system (#2418)

* Remove subtyping for () from node graph type system

* Remove special-case in DynAnyNode for downcasting to ()

* Correct input type for CreateGpuSurfaceNode

* Remove unncessary imports

---------

Co-authored-by: Dennis Kobert <dennis@kobert.dev>
Co-authored-by: Keavon Chambers <keavon@keavon.com>
Co-authored-by: hypercube <0hypercube@gmail.com>
This commit is contained in:
bradrn 2025-03-27 08:26:07 +11:00 committed by GitHub
parent dd27f4653d
commit 92132919d1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 9 additions and 23 deletions

View file

@ -88,9 +88,9 @@ fn node_registry() -> HashMap<ProtoNodeIdentifier, HashMap<NodeIOTypes, NodeCons
ProtoNodeIdentifier::new(stringify!(wgpu_executor::CreateGpuSurfaceNode<_>)),
|args| {
Box::pin(async move {
let editor_api: DowncastBothNode<(), &WasmEditorApi> = DowncastBothNode::new(args[0].clone());
let editor_api: DowncastBothNode<Context, &WasmEditorApi> = DowncastBothNode::new(args[0].clone());
let node = <wgpu_executor::CreateGpuSurfaceNode<_>>::new(editor_api);
let any: DynAnyNode<(), _, _> = graphene_std::any::DynAnyNode::new(node);
let any: DynAnyNode<Context, _, _> = graphene_std::any::DynAnyNode::new(node);
Box::new(any) as TypeErasedBox
})
},