Skip to content

Commit d4353d0

Browse files
jfinkelscakebaker
andauthored
Use str.ends_with for patterns ending in Z
Co-authored-by: Daniel Hofstetter <[email protected]>
1 parent 8aee979 commit d4353d0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ mod format {
8989

9090
/// Whether the pattern ends in the character `Z`.
9191
pub(crate) fn is_zulu(pattern: &str) -> bool {
92-
pattern == YYYYMMDDHHMMSS_HYPHENATED_ZULU || pattern == YYYYMMDDHHMMSS_T_SEP_HYPHENATED_ZULU
92+
pattern.ends_with('Z')
9393
}
9494

9595
/// Patterns for datetimes with timezones.

0 commit comments

Comments
 (0)