From 3a6ca5018d124c65a1db0cef96a8a4e767799a7b Mon Sep 17 00:00:00 2001 From: collin Date: Tue, 23 Mar 2021 14:44:16 -0700 Subject: [PATCH] edit main input comments --- compiler/src/function/input/main_function_input.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/compiler/src/function/input/main_function_input.rs b/compiler/src/function/input/main_function_input.rs index 35824d498d..5eab3a9a7c 100644 --- a/compiler/src/function/input/main_function_input.rs +++ b/compiler/src/function/input/main_function_input.rs @@ -60,7 +60,7 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { )?)), Type::Array(type_, len) => self.allocate_array(cs, name, &*type_, *len, input_option, span), Type::Tuple(types) => self.allocate_tuple(cs, &name, types, input_option, span), - _ => unimplemented!("main function input not implemented for type {}", type_), // Todo @damirka: add an error for this case + _ => unimplemented!("main function input not implemented for type {}", type_), // Should not happen. } } } @@ -113,9 +113,9 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { .collect::, _>>()?, )) } - // The only unimplemented type in Type. - (Type::Circuit(_), _) => unimplemented!("main function input not implemented for type {}", type_), - // If Type => InputValue (type) match did not happen, error out. + (Type::Circuit(_), _) => unimplemented!("main function input not implemented for type {}", type_), // Should not happen. + + // Return an error if the input type and input value do not match. (_, input) => Err(FunctionError::input_type_mismatch( type_.to_string(), input.to_string(),