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

Implement IntoDartExceptPrimitive for bool #47

Merged
merged 4 commits into from
Sep 11, 2023

Conversation

NightFeather0615
Copy link
Contributor

@NightFeather0615 NightFeather0615 commented Sep 10, 2023

Refer to fzyzcjy/flutter_rust_bridge#801 and fzyzcjy/flutter_rust_bridge#1353.

bool should implement IntoDartExceptPrimitive so that Vec<bool> can be converted to List<bool>, since Dart does not have a primitive list implemented for boolean (e.g. Uint8List for 8-bit unsigned int).

@shekohex
Copy link
Owner

Could you please add a comment referring to this PR to explain why the bool is not primitive into dart when it comes to List and not something like UintXList? I know it is not supported natively in dart, which is okay, but we should add that comment on the implementation so that future readers did not get confused on why bool is not primitive.

@NightFeather0615
Copy link
Contributor Author

NightFeather0615 commented Sep 11, 2023

Sure! I've added comments for this PR.

There are some errors in the Clippy section of the CI test, should I change the code in that section?

@shekohex
Copy link
Owner

Sure! I've added comments for this PR.

There are some errors in the Clippy section of the CI test, should I change the code in that section?

Sure, lets make these fixes.

@NightFeather0615
Copy link
Contributor Author

The error should now be fixed!

@shekohex
Copy link
Owner

Thank you!

@shekohex shekohex merged commit c4e2bc4 into shekohex:master Sep 11, 2023
5 checks passed
@NightFeather0615
Copy link
Contributor Author

Thanks for your review, have a nice day!

@NightFeather0615
Copy link
Contributor Author

By the way, I'd like to know when this change will be released, as there's a PR blocked by this problem 😄.

@shekohex
Copy link
Owner

Yup, was planning to release it today, last night I was on phone.

@shekohex
Copy link
Owner

Released to the v0.1.19.

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

Successfully merging this pull request may close these issues.

2 participants