From ff03e643147e59358cf1b00a25140a5d0219575a Mon Sep 17 00:00:00 2001 From: Collin Chin Date: Tue, 27 Oct 2020 10:58:09 -0700 Subject: [PATCH] Prefer to_vec over to_owned --- dynamic-check/src/assertions/type_variable_pair.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dynamic-check/src/assertions/type_variable_pair.rs b/dynamic-check/src/assertions/type_variable_pair.rs index da3dd52dc3..34a91dff3e 100644 --- a/dynamic-check/src/assertions/type_variable_pair.rs +++ b/dynamic-check/src/assertions/type_variable_pair.rs @@ -109,8 +109,8 @@ impl TypeVariablePairs { span: &Span, ) -> Result<(), TypeAssertionError> { // Flatten the array types to get the element types. - let (left_type_flat, left_dimensions_flat) = flatten_array_type(&left_type, left_dimensions.to_owned()); - let (right_type_flat, right_dimensions_flat) = flatten_array_type(&right_type, right_dimensions.to_owned()); + let (left_type_flat, left_dimensions_flat) = flatten_array_type(&left_type, left_dimensions.to_vec()); + let (right_type_flat, right_dimensions_flat) = flatten_array_type(&right_type, right_dimensions.to_vec()); // If the dimensions do not match, then throw an error. if left_dimensions_flat.ne(&right_dimensions_flat) {