Open pitdicker opened 6 months ago
Attention: Patch coverage is 65.85366%
with 14 lines
in your changes are missing coverage. Please review.
Project coverage is 91.77%. Comparing base (
0cfc405
) to head (30735ee
).
Files | Patch % | Lines |
---|---|---|
src/format/formatting.rs | 69.69% | 10 Missing :warning: |
src/date.rs | 0.00% | 4 Missing :warning: |
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Just learned that adding a type parameter is a backwards-compatible change if it has a default type, thanks to RFC 0213.
That means we can fix the biggest remaining performance problem with
DelayedFormat
, and make our formatting work without allocations! :tada:In this PR I only added an extra generic parameter to
DelayedFormat
. Making our formatting work without allocating needs one more tricky thing that is best for another PR.To quote from #1163:
By taking the offset as a generic we can delay formatting the timezone name until it is needed, which often is never.
To keep the deprecated
format::{format, format_items}
functions working (which expect aString
andFixedOffset
instead of a generic offset) I had to add anOffsetWrapper
type.Benchmarks