@@ -539,13 +539,23 @@ impl ProtoNetwork {
539539#[ derive( Clone , PartialEq , serde:: Serialize , serde:: Deserialize ) ]
540540pub enum GraphErrorType {
541541 NodeNotFound ( NodeId ) ,
542- UnexpectedGenerics { index : usize , inputs : Vec < Type > } ,
542+ UnexpectedGenerics {
543+ index : usize ,
544+ inputs : Vec < Type > ,
545+ } ,
543546 NoImplementations ,
544547 NoConstructor ,
545- // The first vec represents a list of correct NodeIOTypes
546- // The second vec represents what the input index and what it expects
547- InvalidImplementations { inputs : String , error_inputs : Vec < Vec < ( usize , ( Type , Type ) ) > > } ,
548- MultipleImplementations { inputs : String , valid : Vec < NodeIOTypes > } ,
548+ /// The `inputs` represents a formatted list of input indices corresponding to their types.
549+ /// Each element in `error_inputs` represents a valid `NodeIOTypes` implementation.
550+ /// The inner Vec stores the inputs which need to be changed and what type each needs to be changed to.
551+ InvalidImplementations {
552+ inputs : String ,
553+ error_inputs : Vec < Vec < ( usize , ( Type , Type ) ) > > ,
554+ } ,
555+ MultipleImplementations {
556+ inputs : String ,
557+ valid : Vec < NodeIOTypes > ,
558+ } ,
549559}
550560impl Debug for GraphErrorType {
551561 // TODO: format with the document graph context so the input index is the same as in the graph UI.
@@ -762,7 +772,7 @@ impl TypingContext {
762772 let mut best_errors = usize:: MAX ;
763773 let mut error_inputs = Vec :: new ( ) ;
764774 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
775+ // For errors on Convert nodes, offset the input index so it correctly corresponds to the node it is connected to.
766776 let current_errors = [ call_argument]
767777 . into_iter ( )
768778 . chain ( & inputs)
0 commit comments