Skip to content

Comments

[Rust] fix length calculation in stream.write bindings#1157

Merged
dicej merged 1 commit intobytecodealliance:mainfrom
dicej:stream-write-length-fix
Feb 6, 2025
Merged

[Rust] fix length calculation in stream.write bindings#1157
dicej merged 1 commit intobytecodealliance:mainfrom
dicej:stream-write-length-fix

Conversation

@dicej
Copy link
Collaborator

@dicej dicej commented Feb 6, 2025

When calculating the length we pass to the stream.write intrinsic, we need to subtract the number of bytes we've already written. I forgot to do that in my original PR.

When calculating the length we pass to the `stream.write` intrinsic, we need to
subtract the number of bytes we've already written.  I forgot to do that in my
original PR.

Signed-off-by: Joel Dice <joel.dice@fermyon.com>
@dicej dicej requested a review from alexcrichton February 6, 2025 16:11
@dicej dicej enabled auto-merge February 6, 2025 16:15
@dicej dicej added this pull request to the merge queue Feb 6, 2025
Merged via the queue into bytecodealliance:main with commit 5d8fa61 Feb 6, 2025
25 checks passed
@dicej dicej deleted the stream-write-length-fix branch February 6, 2025 17:21
dicej added a commit to dicej/wasip3-components that referenced this pull request Feb 6, 2025
bytecodealliance/wit-bindgen#1157

Also, minor code cleanup.

Signed-off-by: Joel Dice <joel.dice@fermyon.com>
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.

2 participants