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

Document 'unsharing' in as_mut_ptr and raw_view_mut #1017

Merged
merged 1 commit into from Jun 5, 2021

Conversation

jturner314
Copy link
Member

The primary motivation for this PR is to add the warning to .as_mut_ptr().

@bluss bluss added this to the 0.15.3 milestone May 31, 2021
@bluss
Copy link
Member

bluss commented Jun 5, 2021

Thanks

@bluss bluss merged commit 1daff26 into rust-ndarray:master Jun 5, 2021
@bluss
Copy link
Member

bluss commented Jun 5, 2021

In general it seems fraught to use this method in array-backend generic code. We could advise users of generic arrays to always take a view_mut() (or raw view) and work from that. (While ensuring users understand that the mutable array view is always uniquely referencing the array data).

@jturner314 jturner314 deleted the doc-unsharing branch June 5, 2021 20:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants