Skip to content

Commit 55903c9

Browse files
authored
Apply suggestions from code review
1 parent c623e79 commit 55903c9

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

node-graph/graph-craft/src/document.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ pub struct OriginalLocation {
8484
pub dependants: Vec<Vec<NodeId>>,
8585
/// A list of flags indicating whether the input is exposed in the UI
8686
pub inputs_exposed: Vec<bool>,
87-
// For automatically inserted convert and into nodes, if there is an error display it on the node it is connect to
87+
/// For automatically inserted Convert and Into nodes, if there is an error, display it on the node it is connect to.
8888
pub auto_convert_index: Option<usize>,
8989
}
9090

node-graph/graph-craft/src/proto.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -542,8 +542,9 @@ pub enum GraphErrorType {
542542
UnexpectedGenerics { index: usize, inputs: Vec<Type> },
543543
NoImplementations,
544544
NoConstructor,
545-
// The first vec represents a list of correct NodeIOTypes
546-
// The second vec represents what the input index and what it expects
545+
/// The `inputs` represents a formatted list of input indices corresponding to their types.
546+
/// Each element in `error_inputs` represents a valid `NodeIOTypes` implementation.
547+
/// The inner Vec stores the inputs which need to be changed and what type each needs to be changed to.
547548
InvalidImplementations { inputs: String, error_inputs: Vec<Vec<(usize, (Type, Type))>> },
548549
MultipleImplementations { inputs: String, valid: Vec<NodeIOTypes> },
549550
}
@@ -762,7 +763,7 @@ impl TypingContext {
762763
let mut best_errors = usize::MAX;
763764
let mut error_inputs = Vec::new();
764765
for node_io in impls.keys() {
765-
// For errors on convert nodes, add to the input index to it is correct for the node it is connected to
766+
// For errors on Convert nodes, offset the input index so it correctly corresponds to the node it is connected to.
766767
let current_errors = [call_argument]
767768
.into_iter()
768769
.chain(&inputs)

0 commit comments

Comments
 (0)