typelevel / typelevel-scalafix

Scalafix rules for Typelevel projects
Apache License 2.0
21 stars 6 forks source link

Rewrite `Right(())` to `Either.unit` #46

Open armanbilge opened 2 years ago

armanbilge commented 2 years ago

Either.unit is a Cats syntax and is cached, so saves the allocation.

armanbilge commented 2 years ago

Another one in this guise is that ().pure[F] should be rewritten to Applicative[F].unit.