mirror of
https://github.com/eliasstepanik/egui_node_graph.git
synced 2026-01-20 18:28:27 +00:00
lambda -> closure
This commit is contained in:
parent
452607d9ad
commit
9386057e48
@ -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,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user