From 4e9c2253fef99844744785a0cb830001825d5dc9 Mon Sep 17 00:00:00 2001 From: collin Date: Wed, 2 Dec 2020 12:36:50 -0500 Subject: [PATCH] fix failing clippy check --- ast/src/input/input_value.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ast/src/input/input_value.rs b/ast/src/input/input_value.rs index 1f6124e518..975b99dd17 100644 --- a/ast/src/input/input_value.rs +++ b/ast/src/input/input_value.rs @@ -53,8 +53,8 @@ impl InputValue { Ok(InputValue::Boolean(boolean)) } - fn from_number(integer_type: IntegerType, number: String) -> Result { - Ok(InputValue::Integer(integer_type, number)) + fn from_number(integer_type: IntegerType, number: String) -> Self { + InputValue::Integer(integer_type, number) } fn from_group(group: InputGroupValue) -> Self { @@ -69,7 +69,7 @@ impl InputValue { match data_type { DataType::Address(_) => Err(InputParserError::implicit_type(data_type, implicit)), DataType::Boolean(_) => Err(InputParserError::implicit_type(data_type, implicit)), - DataType::Integer(integer_type) => InputValue::from_number(integer_type, implicit.to_string()), + DataType::Integer(integer_type) => Ok(InputValue::from_number(integer_type, implicit.to_string())), DataType::Group(_) => Err(InputParserError::implicit_group(implicit)), DataType::Field(_) => Ok(InputValue::Field(implicit.to_string())), } @@ -80,7 +80,7 @@ impl InputValue { (DataType::Address(_), Value::Address(address)) => Ok(InputValue::from_address_value(address)), (DataType::Boolean(_), Value::Boolean(boolean)) => InputValue::from_boolean(boolean), (DataType::Integer(integer_type), Value::Integer(integer)) => { - InputValue::from_number(integer_type, integer.to_string()) + Ok(InputValue::from_number(integer_type, integer.to_string())) } (DataType::Group(_), Value::Group(group)) => Ok(InputValue::from_group(group)), (DataType::Field(_), Value::Field(field)) => Ok(InputValue::from_field(field)),