Skip to content

Remove DataOwned constraint from into_owned #498

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

Merged
merged 1 commit into from
Oct 27, 2018

Conversation

jturner314
Copy link
Member

This is useful because it allows generalizing .into_owned() to ArrayView and ArrayViewMut. This means that if you want to always clone the elements, you can use .to_owned(), while if you want to avoid cloning elements when possible, you can use .into_owned().

This is technically a breaking change if removing undocumented methods is considered breaking (since DataOwned::into_owned no longer exists).

This is useful because it allows generalizing `.into_owned()` to
`ArrayView` and `ArrayViewMut`. This means that if you want to always
clone the elements, you can use `.to_owned()`, while if you want to
avoid cloning elements when possible, you can use `.into_owned()`.
@bluss bluss merged commit 68e0034 into rust-ndarray:master Oct 27, 2018
@jturner314 jturner314 deleted the relax-into_owned branch October 27, 2018 16:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants