-
Notifications
You must be signed in to change notification settings - Fork 17
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 conversions for JObject wrapper types #50
base: master
Are you sure you want to change the base?
Conversation
@giovanniberti I also added a fix for And I need your advice how to add tests for unchecked conversion too. |
I implemented #[call_type(unchecked)]
pub extern "jni" fn userArray() -> Box<[User<'env, 'borrow>]> {
vec![].into_boxed_slice()
} work, because it's not possible to impl foreign trait for slices and it's also not possible to impl @giovanniberti can you take a look, please? I really need this feature to implement some bindings (it actually doesn't matter if rust type is UPD: I created conversions for one-dimensional arrays, but not for other types. I'm wondering how to impl TryFromJavaValue for structures like UPD2: I created an example in the tests, but I think it'd be better to impl it with |
@EliseChouleur So, I assume it's better to wait for #59, right? |
@giovanniberti , @EliseChouleur , take a look, please. There are still a lot of improvements to be added, but I assume it'd be better to merge this to fix bugs and to avoid conflicts in migration to jni-0.21, since this PR is really huge. |
Sorry for the very late review. (understatement of the century right there :) ) Just a few comments:
Thank you again for all the effort! |
Uh, sorry, I created a mess with branches, and unfortunately I didn't manage to update jni to 0.21.1, moved to another branch and gave up. This MR contains other useful fixes, though, and I can return it back into working condition - with jni 0.20 as a dependency - if you want to merge. |
Sure!
No problem, I myself have left this repo in a semi-abandoned state since last year — it's in the spirit of FOSS that people can contribute whenever they want and can :) |
I reverted stuff back to |
No description provided.