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

Make bytes build accept integer values as individual bytes #12685

Merged
merged 1 commit into from May 1, 2024

Conversation

devyn
Copy link
Contributor

@devyn devyn commented Apr 27, 2024

Description

This creates an option for building binary data from byte integers.
Previously I think you could only do this by formatting the integers to
hex and using decode hex.

One potentially confusing thing is that this is different from the into binary behavior. But since this doesn't support any of the other into binary behaviors, it might be okay.

User-Facing Changes

  • bytes build accepts single byte arguments as integers

Tests + Formatting

Example added.

After Submitting

  • release notes

This creates an option for building binary data from byte integers.
Previously I think you could only do this by formatting the integers to
hex and using `decode hex`.

One potentially confusing thing is that this is different from the `into
binary` behavior. But since this doesn't support any of the other `into
binary` behaviors, it might be okay.
@devyn devyn added wait-until-after-nushell-release pr:release-note-mention Addition/Improvement to be mentioned in the release notes pr:commands This PR changes our commands in some way labels Apr 30, 2024
@fdncred fdncred merged commit 2970d48 into nushell:main May 1, 2024
15 checks passed
@fdncred
Copy link
Collaborator

fdncred commented May 1, 2024

Thanks

@hustcer hustcer added this to the v0.94.0 milestone May 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr:commands This PR changes our commands in some way pr:release-note-mention Addition/Improvement to be mentioned in the release notes wait-until-after-nushell-release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants