Skip to content

Conversation

nicholasbishop
Copy link
Member

This is modeled after CStr::from_bytes_until_nul, which was added in Rust 1.69. It's often the case that you have a slice of data containing a string, but the buffer size is larger than the string; these new methods make that case easy to handle.

Checklist

  • Sensible git history (for example, squash "typo" or "fix" commits). See the Rewriting History guide for help.
  • Update the changelog (if necessary)

This is modeled after `CStr::from_bytes_until_nul`, which was added in Rust
1.69. It's often the case that you have a slice of data containing a string, but
the buffer size is larger than the string; these new methods make that case easy
to handle.

[1]: https://doc.rust-lang.org/std/ffi/struct.CStr.html#method.from_bytes_until_nul
@phip1611 phip1611 added this pull request to the merge queue Oct 6, 2024
Merged via the queue into rust-osdev:main with commit 7154676 Oct 6, 2024
14 checks passed
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