Refactor asynchronous serialization and deserialization APIs#324
Refactor asynchronous serialization and deserialization APIs#324vsanthanam merged 1 commit intomainfrom
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 806cd3e247
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| let indices = realArray.indices | ||
| let last = indices.last.unsafelyUnwrapped |
There was a problem hiding this comment.
Guard empty filtered arrays before unwrapping last index
When SerializationOptions.omitNullValues is set, realArray can be empty even if the original array isn’t (e.g., an array containing only null). In that case realArray.indices.last.unsafelyUnwrapped will trap and crash during serialization; the prior implementation tolerated this and produced []. Consider checking realArray.isEmpty (or avoiding the force unwrap) before taking the last index so arrays that filter to empty still serialize safely.
Useful? React with 👍 / 👎.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #324 +/- ##
==========================================
+ Coverage 95.48% 95.83% +0.34%
==========================================
Files 39 40 +1
Lines 3303 3434 +131
==========================================
+ Hits 3154 3291 +137
+ Misses 149 143 -6
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
806cd3e to
347721d
Compare
347721d to
010e28e
Compare
No description provided.