lambda -> closure

This commit is contained in:
Philpax 2022-05-24 17:14:26 +02:00
parent 452607d9ad
commit 9386057e48

View File

@ -142,7 +142,7 @@ impl NodeTemplateTrait for MyNodeTemplate {
// The nodes are created empty by default. This function needs to take // The nodes are created empty by default. This function needs to take
// care of creating the desired inputs and outputs based on the template // care of creating the desired inputs and outputs based on the template
// We define some lambdas here to avoid boilerplate. Note that this is // We define some closures here to avoid boilerplate. Note that this is
// entirely optional. // entirely optional.
let input_scalar = |graph: &mut MyGraph, name: &str| { let input_scalar = |graph: &mut MyGraph, name: &str| {
graph.add_input_param( graph.add_input_param(
@ -176,7 +176,7 @@ impl NodeTemplateTrait for MyNodeTemplate {
match self { match self {
MyNodeTemplate::AddScalar => { MyNodeTemplate::AddScalar => {
// The first input param doesn't use the lambda so we can comment // The first input param doesn't use the closure so we can comment
// it in more detail. // it in more detail.
graph.add_input_param( graph.add_input_param(
node_id, node_id,