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

=str Switch the type parameter order of UnfoldResourceSourceAsync #616

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

He-Pin
Copy link
Member

@He-Pin He-Pin commented Sep 2, 2023

Same as #615

Motvation:
Switch the type parameter order and change the S to R.

Result:
Clean code.

Modification:
Previous the resource can be null, but now can't, that's resonable.

close: (S) => Future[Done]): Source[T, NotUsed] =
def unfoldResourceAsync[T, R](
create: () => Future[R],
read: (R) => Future[Option[T]],
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
read: (R) => Future[Option[T]],
read: R => Future[Option[T]],

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.

None yet

2 participants