Skip to content
This repository has been archived by the owner on Feb 18, 2024. It is now read-only.

Add as_boxed method to MutableArray #447

Closed
sd2k opened this issue Sep 25, 2021 · 1 comment · Fixed by #450
Closed

Add as_boxed method to MutableArray #447

sd2k opened this issue Sep 25, 2021 · 1 comment · Fixed by #450
Labels
no-changelog Issues whose changes are covered by a PR and thus should not be shown in the changelog

Comments

@sd2k
Copy link
Contributor

sd2k commented Sep 25, 2021

MutableArray has as_arc, but not as_boxed (or into_boxed? not sure which is more appropriate) right now, although GrowableArray does - is this something you would consider adding? I have a use case which requires it to implement Deserialize for a Box<dyn Array> wrapper 🙂

Happy to send in a PR if this sounds good. Thanks!

@jorgecarleitao
Copy link
Owner

Sounds great! Yes, in general it is good to have both methods. Rust does not have an idiomatic way of writing a function that can return either, so we need to do it ourselves 👍

Thanks for volunteering for working on it; let me know if you get stuck :)

@jorgecarleitao jorgecarleitao added the no-changelog Issues whose changes are covered by a PR and thus should not be shown in the changelog label Sep 26, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
no-changelog Issues whose changes are covered by a PR and thus should not be shown in the changelog
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants