fix(schema): lossy utf8 decoding for bytearrays - #3358
Merged
Conversation
Contributor
|
Caution Review failedThe pull request is closed. Ohayo, sensei! WalkthroughUpdates ByteArray deserialization in crates/dojo/types/src/schema.rs to assign a lossy UTF-8 string after draining consumed felts. Also bumps cainome and cainome-cairo-serde versions in Cargo.toml. No public API changes. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
participant Caller
participant Ty as Ty::deserialize
participant CS as Cairo Serde
participant BA as ByteArray
Caller->>Ty: deserialize(ByteArray, felts)
Ty->>CS: deserialize(ByteArray from felts)
CS-->>Ty: ByteArray value + consumed count
Ty->>BA: drain consumed felts
Ty->>Ty: string = ByteArray.to_string_lossy()
Ty-->>Caller: Ty::ByteArray(string)
note over Ty,Caller: Public type remains ByteArray(String)
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
📜 Recent review detailsConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (2)
Comment |
Larkooo
enabled auto-merge (squash)
October 9, 2025 17:04
glihm
approved these changes
Oct 9, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary by CodeRabbit
Bug Fixes
Chores