Skip to content

btree: Reliance on structure layout #27620

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

Closed
tbu- opened this issue Aug 9, 2015 · 1 comment
Closed

btree: Reliance on structure layout #27620

tbu- opened this issue Aug 9, 2015 · 1 comment

Comments

@tbu-
Copy link
Contributor

tbu- commented Aug 9, 2015

The function collections::btree::node::Node::as_slices_internal_mut relies on structure layout of two relatively unrelated structures to be the same, which is considered a bad thing™:

#[inline]
pub fn as_slices_internal_mut<'b>(&'b mut self) -> MutNodeSlice<'b, K, V> {
    unsafe { mem::transmute(self.as_slices_internal()) }
}
@apasel422
Copy link
Contributor

I'm working on this.

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

No branches or pull requests

3 participants