Skip to content

fix(schema): lossy utf8 decoding for bytearrays - #3359

Closed
Larkooo wants to merge 5 commits into
dojoengine:mainfrom
Larkooo:bytearray-unchecked
Closed

fix(schema): lossy utf8 decoding for bytearrays#3359
Larkooo wants to merge 5 commits into
dojoengine:mainfrom
Larkooo:bytearray-unchecked

Conversation

@Larkooo

@Larkooo Larkooo commented Oct 9, 2025

Copy link
Copy Markdown
Collaborator

Summary by CodeRabbit

  • Bug Fixes
    • Improved handling of byte array deserialization to safely convert non-UTF-8 data, reducing errors and providing a more consistent, readable string output.
  • Chores
    • Updated dependencies to the latest patch versions for improved stability: cainome 0.10.1 and cainome-cairo-serde 0.4.1.

@Larkooo Larkooo closed this Oct 9, 2025
@coderabbitai

coderabbitai Bot commented Oct 9, 2025

Copy link
Copy Markdown
Contributor

Caution

Review failed

The pull request is closed.

ohayo, sensei

Walkthrough

Dependency versions were bumped in Cargo.toml. A ByteArray deserialization branch in schema.rs now uses to_string_lossy() and a renamed local variable, without changing control flow.

Changes

Cohort / File(s) Summary
Workspace dependency updates
Cargo.toml
Bumped cainome 0.10.0 → 0.10.1 (features unchanged), cainome-cairo-serde 0.4.0 → 0.4.1.
Deserialization tweak
crates/dojo/types/src/schema.rs
In Ty::deserialize ByteArray arm: rename local from bytes to string; switch conversion to bytearray.to_string_lossy() for stored string value.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

📜 Recent review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 711cb72 and 94a65d2.

⛔ Files ignored due to path filters (1)
  • Cargo.lock is excluded by !**/*.lock
📒 Files selected for processing (2)
  • Cargo.toml (1 hunks)
  • crates/dojo/types/src/schema.rs (1 hunks)

Comment @coderabbitai help to get the list of available commands and usage tips.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant