fix: #22 deserialization for CBOR floats - #25
Conversation
PrefetchedDeserializer, used when deserializing Option<T>, only handled booleans for CBOR major type 7 (simple/float) and errored on floats (info 25/26/27) and undefined. This broke any struct with an optional float field, e.g. Option<f64> shape dimensions.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #25 +/- ##
==========================================
- Coverage 66.58% 66.16% -0.43%
==========================================
Files 6 6
Lines 1721 1732 +11
==========================================
Hits 1146 1146
- Misses 575 586 +11 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Merging this PR will improve performance by 10.63%
|
| Benchmark | BASE |
HEAD |
Efficiency | |
|---|---|---|---|---|
| ⚡ | decode_vec_1000_ints |
53.5 µs | 48.4 µs | +10.63% |
Tip
Curious why this is faster? Comment @codspeedbot explain why this is faster on this PR, or directly use the CodSpeed MCP with your agent.
Comparing gpeacock/fix-issue-22-option-float (d881a73) with main (3fd0162)
|
tests are in integration and not caught by code coverage yet. |
PrefetchedDeserializer, used when deserializing Option, only handled booleans for CBOR major type 7 (simple/float) and errored on floats (info 25/26/27) and undefined. This broke any struct with an optional float field, e.g. Option shape dimensions.
Changes in this pull request
Give a narrative description of what has been changed.
Checklist
TO DOitems (or similar) have been entered as GitHub issues and the link to that issue has been included in a comment.