Skip to content

Commit b4bb002

Browse files
committed
clippy fix
1 parent d9b3d4b commit b4bb002

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

datafusion/functions/src/datetime/common.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,7 @@ fn has_explicit_timezone(value: &str) -> bool {
281281
}
282282

283283
// Heuristic: trailing numeric offset like +0500, +05:00, -0330, etc.
284-
if let Some(pos) = v.rfind(|c| c == '+' || c == '-') {
284+
if let Some(pos) = v.rfind(|c| ['+', '-'].contains(&c)) {
285285
// Exclude scientific notation like 1.5e+10 (preceded by 'e' or 'E')
286286
if !(pos > 0
287287
&& v.chars()
@@ -292,7 +292,7 @@ fn has_explicit_timezone(value: &str) -> bool {
292292
// Ensure the sign likely follows a time component. Look for a separator
293293
// (space or 'T') before the sign and check for a ':' between that
294294
// separator and the sign to avoid treating date dashes as offsets.
295-
let sep_pos = v[..pos].rfind(|c| c == ' ' || c == 'T' || c == 't');
295+
let sep_pos = v[..pos].rfind(|c| [' ', 'T', 't'].contains(&c));
296296
let has_time_before_sign = if let Some(spos) = sep_pos {
297297
v[spos + 1..pos].contains(':')
298298
} else {

0 commit comments

Comments
 (0)