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

Can it work for smallvec? #10

Open
devongovett opened this issue Jan 28, 2022 · 2 comments
Open

Can it work for smallvec? #10

devongovett opened this issue Jan 28, 2022 · 2 comments

Comments

@devongovett
Copy link

Here, it seems to have a hard-coded condition for Vec: https://github.com/koivunej/derive-into-owned/blob/master/src/helpers.rs#L130. Is it possible to support smallvec and possibly other types of collections as well? I tried using a trait to implement into_owned on SmallVec manually, but it still didn't work when contained in another struct.

@koivunej
Copy link
Owner

Sorry for the really late response, I failed to see an answer a 1y+ ago.

With the trait (see #14) and not duck-typing this might actually be doable. Though, one would have to support a lot of optional dependencies to support all, but regardless, that would be a logical next step.

@devongovett
Copy link
Author

No worries. We ended up creating a new crate that uses a trait plus a similar derive macro for it. You're welcome to close this issue if you want.

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

No branches or pull requests

2 participants