Skip to content

Commit

Permalink
Fix clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
viirya committed Jan 1, 2024
1 parent cab02dd commit e93ee10
Showing 1 changed file with 6 additions and 10 deletions.
16 changes: 6 additions & 10 deletions arrow-string/src/regexp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -378,11 +378,9 @@ pub fn regexp_match(
match array.data_type() {
DataType::Utf8 => regexp_scalar_match(array.as_string::<i32>(), &re),
DataType::LargeUtf8 => regexp_scalar_match(array.as_string::<i64>(), &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() {
Expand All @@ -396,11 +394,9 @@ pub fn regexp_match(
let flags_array = flags.map(|flags| flags.as_string());
regexp_array_match(array.as_string::<i64>(), 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(),
)),
}
}
}
Expand Down

0 comments on commit e93ee10

Please sign in to comment.