Skip to content

Commit ada8c2f

Browse files
committed
ref: replaced NodeFunctions with repeated NodeFunction
1 parent d328963 commit ada8c2f

File tree

2 files changed

+6
-10
lines changed

2 files changed

+6
-10
lines changed

build/rust/src/lib.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ pub mod shared {
1919
r#type: "no".to_string(),
2020
settings: vec![],
2121
starting_node_id: 0,
22-
node_functions: None,
22+
node_functions: vec![],
2323
};
2424

2525
let str_flow = serde_json::to_string(&flow).expect("Serialization failed");
@@ -35,7 +35,7 @@ pub mod shared {
3535
"data_types": [],
3636
"settings": [],
3737
"starting_node_id": 0,
38-
"node_functions": null
38+
"node_functions": []
3939
});
4040

4141
assert_eq!(json_flow, expected_json);
@@ -52,7 +52,7 @@ pub mod shared {
5252
"data_types": [],
5353
"settings": [],
5454
"starting_node_id": 0,
55-
"node_functions": null
55+
"node_functions": []
5656
}"#;
5757

5858
let deserialized: Result<ValidationFlow, _> = serde_json::from_str(json_data);
@@ -67,7 +67,7 @@ pub mod shared {
6767
input_type_identifier: None,
6868
return_type_identifier: None,
6969
starting_node_id: 0,
70-
node_functions: None,
70+
node_functions: vec![],
7171
};
7272

7373
assert_eq!(deserialized.unwrap(), expected_flow);

proto/shared/shared.flow.proto

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,14 @@ message ValidationFlow {
2020
optional string return_type_identifier = 6;
2121
repeated FlowSetting settings = 7;
2222
int64 starting_node_id = 8;
23-
NodeFunctions node_functions = 9;
23+
repeated NodeFunction node_functions = 9;
2424
}
2525

2626
message ExecutionFlow {
2727
// Database ID -> req. for Aquila to identify in FlowStore
2828
int64 flow_id = 1;
2929
int64 starting_node_id = 2;
30-
NodeFunctions node_functions = 4;
30+
repeated NodeFunction node_functions = 4;
3131
optional shared.Value input_value = 3;
3232
}
3333

@@ -46,10 +46,6 @@ message NodeFunction {
4646
optional int64 next_node_id = 4;
4747
}
4848

49-
message NodeFunctions {
50-
repeated NodeFunction functions = 1;
51-
}
52-
5349
message NodeValue {
5450
oneof value {
5551
shared.Value literal_value = 1;

0 commit comments

Comments
 (0)