Implement From<Array<A, D>> for ArcArray<A, D>#1021
Implement From<Array<A, D>> for ArcArray<A, D>#1021bluss merged 1 commit intorust-ndarray:masterrust-ndarray/ndarray:masterfrom jturner314:impl-from-Array-for-ArcArrayjturner314/ndarray:impl-from-Array-for-ArcArrayCopy head branch name to clipboard
Conversation
|
Agree. I hope to keep the into_shared etc methods somehow, but it's clear that they need to change to support wider diversity of owned arrays (including future differences in allocator). Maybe adding a Clone bound to |
Yeah, I think this makes the most sense. We'd move |
I'd like to make
CowReprimplementDataOwned, whereDataOwnedis changed to mean "a storage type which can own its data". The only issue is the.into_shared()method, which says, "Turn the array into a shared ownership (copy on write) array, without any copying." We can't always turn aCowArrayinto anArcArraywithout copying. One approach (which would be a breaking change) would be to removeDataOwned::into_sharedand just rely on thisFromimplementation instead. Then, we could implementDataOwnedforCowReprwithout issues.Regardless of the
CowReprstuff, this impl still seems useful.