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

Make Sink and LayoutRunner fun interfaces. #174

Merged
merged 1 commit into from
Jan 21, 2021

Conversation

zach-klippenstein
Copy link
Collaborator

This allows consumers to create anonymous instances of them with Kotlin's lambda syntax when using Kotlin 1.4.

@zach-klippenstein zach-klippenstein requested a review from a team as a code owner August 18, 2020 18:18
@zach-klippenstein
Copy link
Collaborator Author

ktlint's not happy. Fix is on the way, see pinterest/ktlint#830

Copy link
Contributor

@steve-the-edwards steve-the-edwards left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What does this gain? Less boilerplate with the SAM style?

@zach-klippenstein
Copy link
Collaborator Author

Just rebased now that we landed 1.4.

@zach-klippenstein
Copy link
Collaborator Author

What does this gain? Less boilerplate with the SAM style?

Yes, we can pass lambdas now instead of having to create anonymous objects.

@zach-klippenstein
Copy link
Collaborator Author

Need to update ktlint to land this, but that then complains about a bunch of our formatting. Tried reformatting in ide as well as using ktlintFormat task, it just got more and more confused about indentation. Need to review the tricks @vRallev used to make this work.

This allows consumers to create anonymous instances of them with Kotlin's lambda syntax when using Kotlin 1.4.
@zach-klippenstein zach-klippenstein changed the base branch from main to zachklipp/fix-code-format January 21, 2021 20:41
@zach-klippenstein
Copy link
Collaborator Author

This should finally work, after upgrading out ktlint version in #277.

Base automatically changed from zachklipp/fix-code-format to main January 21, 2021 21:32
@zach-klippenstein zach-klippenstein merged commit ed64cdd into main Jan 21, 2021
@zach-klippenstein zach-klippenstein deleted the zachklipp/fun-interfaces branch January 21, 2021 21:52
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.

3 participants