Skip to content

Conversation

@krakow10
Copy link
Contributor

@krakow10 krakow10 commented Nov 29, 2025

The intention here is to improve the code from #545, and provide a counterpart to the RbxReadInterleaved trait defined in #530. This removes the "foreign" impl of functions in core.rs onto ChunkBuilder (defining functions onto a struct from another module), and organizes the write_interleaved_* functions into a trait. The initialize_bytes_with function was a cross-module hack, so has been inlined into the write_interleaved_bytes impl. The write test in core_read_write.rs is returned to its former glory because the trait is defined for Vec<u8>, and the constants are deduplicated.

Note:

  • The -> io::Result<()> result is actually infallible (barring allocation failure panics), but is there to match the surrounding function signatures. I have another commit 5968ec4 if we want to make it infallible, since it only ever operates on a Vec.

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