From e93ee10e9e25b8183f72c9d6fde6be6868f11ebe Mon Sep 17 00:00:00 2001 From: Liang-Chi Hsieh Date: Sun, 31 Dec 2023 19:21:42 -0800 Subject: [PATCH] Fix clippy --- arrow-string/src/regexp.rs | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/arrow-string/src/regexp.rs b/arrow-string/src/regexp.rs index 40753756c742..13b06826cc8d 100644 --- a/arrow-string/src/regexp.rs +++ b/arrow-string/src/regexp.rs @@ -378,11 +378,9 @@ pub fn regexp_match( match array.data_type() { DataType::Utf8 => regexp_scalar_match(array.as_string::(), &re), DataType::LargeUtf8 => regexp_scalar_match(array.as_string::(), &re), - _ => { - return Err(ArrowError::ComputeError( - "regexp_match() requires array to be either Utf8 or LargeUtf8".to_string(), - )); - } + _ => Err(ArrowError::ComputeError( + "regexp_match() requires array to be either Utf8 or LargeUtf8".to_string(), + )), } } else { match array.data_type() { @@ -396,11 +394,9 @@ pub fn regexp_match( let flags_array = flags.map(|flags| flags.as_string()); regexp_array_match(array.as_string::(), regex_array, flags_array) } - _ => { - return Err(ArrowError::ComputeError( - "regexp_match() requires array to be either Utf8 or LargeUtf8".to_string(), - )); - } + _ => Err(ArrowError::ComputeError( + "regexp_match() requires array to be either Utf8 or LargeUtf8".to_string(), + )), } } }