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

Replaces other Applicative.pure(()) with .unit #4558

Merged
merged 1 commit into from
Feb 4, 2024

Conversation

satorg
Copy link
Contributor

@satorg satorg commented Feb 3, 2024

A follow up for #4557 – other uses of Applicative.pure(()) are found (with grep) and replaced with .unit.

Note, that there are other places where .pure(()) is in use, however those calls don't belong to Applicative and to replace them the .unit methods have to be added accordingly:

./free/src/main/scala/cats/free/FreeInvariantMonoidal.scala:104:      def unit: FA[S, Unit] = FreeInvariantMonoidal.pure(())
./tests/shared/src/test/scala/cats/tests/IndexedReaderWriterStateTSuite.scala:111:      val rws: ReaderWriterState[String, String, Int, Unit] = ReaderWriterState.pure(())

@satorg satorg self-assigned this Feb 3, 2024
Copy link
Contributor

@johnynek johnynek left a comment

Choose a reason for hiding this comment

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

Thanks for improving the code.

@satorg satorg merged commit 4f15360 into typelevel:main Feb 4, 2024
16 checks passed
@satorg satorg deleted the replace-pure-with-unit branch February 4, 2024 02:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants