-
Notifications
You must be signed in to change notification settings - Fork 62
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
Add RustVec.intoArray() #239
Comments
Good idea.
It isn't possible to borrow a In the future when we supported borrowing we would have swift-bridge/book/src/bridge-module/opaque-types/README.md Lines 52 to 133 in af962ca
If you're interested I'd be happy to merge a PR that adds this Would just leave a TODO to enforce ownership (as in |
Hi,
I think it would be quite useful if RustVec had a builtin
intoArray
method. For example, I had issues using a RustVec in SwiftUI'sList
(I needed to use theList
constructor that takes achildren
key path).I was able to fix my issues with this simple extension:
It should probably return
nil
if theRustVec
isn't owned.The text was updated successfully, but these errors were encountered: