Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: splice bytes in-place when reading buffers #2315

Merged

Conversation

steveluscher
Copy link
Collaborator

Summary

I noticed many places where we:

  1. Read a section of bytes from an array, from index A-B
  2. Overwrite the entire byte array with the bytes from B onward

This is done in two steps using Array#slice twice. What we're looking for here is the mutative, one-step Array#slice.

Test Plan

CI run

Copy link

changeset-bot bot commented Mar 13, 2024

⚠️ No Changeset found

Latest commit: 40fff87

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@steveluscher
Copy link
Collaborator Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

Join @steveluscher and the rest of your teammates on Graphite Graphite

@steveluscher steveluscher merged commit 650707b into master Mar 13, 2024
9 checks passed
@steveluscher steveluscher deleted the 03-13-fix_splice_bytes_in-place_when_reading_buffers branch March 13, 2024 21:35
Copy link
Contributor

🎉 This PR is included in version 1.91.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

Copy link
Contributor

Because there has been no activity on this PR for 14 days since it was merged, it has been automatically locked. Please open a new issue if it requires a follow up.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 28, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant