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

Remove the dependency on java.util.Optional because it requires Android API level 24 #6

Merged
merged 1 commit into from
Jul 1, 2021

Conversation

finalpatch
Copy link
Contributor

It prevents us from using the Outcome<> type on older Android devices.

There is another Optional type provided by Guava. However using that also complicates our dependencies.

Since providing the result and error as optionals is not essential, I decide to simply remove this and encourage the end user to use resultOr() and errorOrNull() instead.

If you really want optional, it's also easy to achieve with the match() function, but I will leave this to the user code as it is easier to know what is available in user code than in the support library.

@finalpatch finalpatch requested a review from bholmes-sc-zz July 1, 2021 01:46
@finalpatch finalpatch merged commit c565407 into master Jul 1, 2021
@finalpatch finalpatch deleted the lf/remove_api24_dependency branch July 1, 2021 22:53
jb-gcx added a commit to jb-gcx/snapchat-djinni that referenced this pull request Jul 8, 2024
…re-cpp-interface

Add waitFor to djinni::Future
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.

4 participants