Skip to content

Commit b5d6314

Browse files
committed
clippy
1 parent e8e1369 commit b5d6314

1 file changed

Lines changed: 21 additions & 42 deletions

File tree

  • native/spark-expr/src/conversion_funcs

native/spark-expr/src/conversion_funcs/string.rs

Lines changed: 21 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -1640,50 +1640,29 @@ mod tests {
16401640
Some(1577862296000000) // 12:34:56 UTC+5:30 = 07:04:56 UTC
16411641
);
16421642
// T-prefixed time-only with colon
1643-
assert_eq!(
1644-
timestamp_parser("T12:34", EvalMode::Legacy, tz)
1645-
.unwrap()
1646-
.is_some(),
1647-
true
1648-
);
1649-
assert_eq!(
1650-
timestamp_parser("T12:34:56", EvalMode::Legacy, tz)
1651-
.unwrap()
1652-
.is_some(),
1653-
true
1654-
);
1655-
assert_eq!(
1656-
timestamp_parser("T12:34:56.123456", EvalMode::Legacy, tz)
1657-
.unwrap()
1658-
.is_some(),
1659-
true
1660-
);
1643+
assert!(timestamp_parser("T12:34", EvalMode::Legacy, tz)
1644+
.unwrap()
1645+
.is_some());
1646+
assert!(timestamp_parser("T12:34:56", EvalMode::Legacy, tz)
1647+
.unwrap()
1648+
.is_some());
1649+
assert!(timestamp_parser("T12:34:56.123456", EvalMode::Legacy, tz)
1650+
.unwrap()
1651+
.is_some());
16611652
// Bare time-only (hour:minute without T prefix)
1662-
assert_eq!(
1663-
timestamp_parser("12:34", EvalMode::Legacy, tz)
1664-
.unwrap()
1665-
.is_some(),
1666-
true
1667-
);
1668-
assert_eq!(
1669-
timestamp_parser("12:34:56", EvalMode::Legacy, tz)
1670-
.unwrap()
1671-
.is_some(),
1672-
true
1673-
);
1653+
assert!(timestamp_parser("12:34", EvalMode::Legacy, tz)
1654+
.unwrap()
1655+
.is_some());
1656+
assert!(timestamp_parser("12:34:56", EvalMode::Legacy, tz)
1657+
.unwrap()
1658+
.is_some());
16741659
// Negative year
1675-
assert_eq!(
1676-
timestamp_parser("-0001", EvalMode::Legacy, tz)
1677-
.unwrap()
1678-
.is_some(),
1679-
true
1680-
);
1681-
assert_eq!(
1682-
timestamp_parser("-0001-01-01T12:34:56", EvalMode::Legacy, tz)
1683-
.unwrap()
1684-
.is_some(),
1685-
true
1686-
);
1660+
assert!(timestamp_parser("-0001", EvalMode::Legacy, tz)
1661+
.unwrap()
1662+
.is_some());
1663+
assert!(timestamp_parser("-0001-01-01T12:34:56", EvalMode::Legacy, tz)
1664+
.unwrap()
1665+
.is_some());
16871666
}
16881667

16891668
#[test]

0 commit comments

Comments
 (0)