We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
unwrap_or_else
1 parent ddde33f commit 0196aa5Copy full SHA for 0196aa5
crates/viewport/src/pipeline.rs
@@ -339,14 +339,14 @@ impl ViewportPipeline {
339
node_name: format!("node-{}", this.nodes.len()),
340
};
341
342
- let handle: NodeHandle = match this.graph.add_node_dynamic(node.0, handle.node_name) {
343
- Ok(node) => node,
344
- Err(err) => match err {
+ let handle: NodeHandle = this
+ .graph
+ .add_node_dynamic(node.0, handle.node_name)
345
+ .unwrap_or_else(|err| match err {
346
computegraph::AddError::DuplicateName(_) => {
347
panic!("this should not happen")
348
}
- },
349
- };
+ });
350
351
match this.connect_plugin(handle.clone(), node.1) {
352
Ok(v) => Ok(v),
0 commit comments