Skip to content

Conversation

bluss
Copy link
Member

@bluss bluss commented Apr 1, 2024

Without the offset from start of allocation to the logically first element of the array,
correctly reinterpreting the results of .into_raw_vec() as an n-D array is tricky.

Provide a smoother transition by deprecating the old method and
introducing a new one.

Return Option, this makes the empty vector case stand out
as a separate case that needs to be handled.

Closes #994 by superseding it.

Without the offset from start of allocation to the logically first
element of the array, correctly reinterpreting the results of
.into_raw_vec() as an n-D array is tricky.
@bluss bluss added this to the 0.16.0 milestone Apr 1, 2024
@bluss bluss changed the title Update into_raw_vec Add .into_raw_vec_with_offset() and deprecate .into_raw_vec() Apr 1, 2024
@bluss bluss force-pushed the offset-to-first-2 branch from a2b6b30 to 38b6eea Compare April 4, 2024 16:50
Provide a smoother transition by deprecating the old method and
introducing a new one.

Return Option<usize>, this makes the empty vector case stand out
as a separate case that needs to be handled.
@bluss bluss force-pushed the offset-to-first-2 branch from 38b6eea to edfbe81 Compare April 4, 2024 16:59
@bluss bluss enabled auto-merge April 4, 2024 17:00
@bluss bluss added this pull request to the merge queue Apr 4, 2024
Merged via the queue into master with commit 510d65b Apr 4, 2024
@bluss
Copy link
Member Author

bluss commented Apr 4, 2024

thanks for looking at this

@bluss bluss deleted the offset-to-first-2 branch April 4, 2024 18:06
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.

3 participants