Collection of minor adjustments and fixes#8
Merged
Conversation
Export the core and alloc dependencies for macros to use. There is little harm in re-exporting those dependencies, given that we already depend on them, and on their stability guarantees. This kinda blocks `osi::core` and `osi::alloc` for future use, but that seems ok'ish, and would conflict with current use of `core` and `alloc` inside of `osi`, anyway. Signed-off-by: David Rheinsberg <david@readahead.eu>
Two new helpers to get `MaybeUninit` for any read-only type. This is really useful as source operand to `copy_from_slice()` and similar, if the target is a `MaybeUninit`. Signed-off-by: David Rheinsberg <david@readahead.eu>
Accessing uninitialized data is never safe in Rust. The reason is that some hardware platforms have support for actual hardware markers of uninitialized bytes, and thus LLVM can never provide a way to read such data, even if the target platform would support it. There is an argument to be made for Rust to use something else to model padding bytes, but that is not our decision to make, so lets just not read padding bytes for now. Signed-off-by: David Rheinsberg <david@readahead.eu>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
3 fixes to
osiand a minor addition:as_bytes()to be unsafe, and document why