fmt: fix buffer sizes when printing durations

The ISO 8601 buffer for durations was sized for `SignedDuration::MIN`,
but the longest output is a negative duration with 16 digits of hours
and two digit minutes and seconds, e.g.,
`-PT2562047788015214H59M59.999999999S`, which is 36 bytes.

Similarly, the friendly format buffer for `std::time::Duration` didn't
account for the `+` prefix written by `Direction::ForceSign`.

Fixes #654
This commit is contained in:
dualfroz committed 2026-10-13 09:55:38 -04:00
1 parent e14c262673
commit a580c0b437
3 files changed
+37 -5

No files matched your search

+10
View File
@@ -1,5 +1,15 @@
# CHANGELOG
0.2.39 (TBD)
============
TODO
Bug fixes:
* [#654](https://github.com/BurntSushi/jiff/issues/654):
Fixes a panic when printing some very large durations.
0.2.38 (2026-10-06)
===================
This release updates Jiff's bundled copy of the [IANA Time Zone Database]