Skip to content

Commit

Permalink
Remove unused type param from Cache#lookup (#490)
Browse files Browse the repository at this point in the history
  • Loading branch information
kyri-petrou authored Jun 25, 2024
1 parent f79ed5a commit 6dc46c9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions zio-query/shared/src/main/scala/zio/query/Cache.scala
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ trait Cache {
* the request is in the cache returns a `Right` with a `Promise` that will
* contain the result of the request when it is executed.
*/
def lookup[R, E, A, B](request: A)(implicit
def lookup[E, A, B](request: A)(implicit
ev: A <:< Request[E, B],
trace: Trace
): UIO[Either[Promise[E, B], Promise[E, B]]]
Expand Down Expand Up @@ -79,10 +79,10 @@ object Cache {
def get[E, A](request: Request[E, A])(implicit trace: Trace): IO[Unit, Promise[E, A]] =
ZIO.suspendSucceed {
val out = map.get(request).asInstanceOf[Promise[E, A]]
if (out eq null) ZIO.fail(()) else ZIO.succeed(out)
if (out eq null) Exit.fail(()) else Exit.succeed(out)
}

def lookup[R, E, A, B](request: A)(implicit
def lookup[E, A, B](request: A)(implicit
ev: A <:< Request[E, B],
trace: Trace
): UIO[Either[Promise[E, B], Promise[E, B]]] =
Expand Down

0 comments on commit 6dc46c9

Please sign in to comment.