From a0bbd693e9da5dec5b6777628d1d89fd22d9f463 Mon Sep 17 00:00:00 2001 From: Kyri Petrou Date: Tue, 25 Jun 2024 11:09:41 +1000 Subject: [PATCH] Remove unused type param from Cache#lookup --- zio-query/shared/src/main/scala/zio/query/Cache.scala | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/zio-query/shared/src/main/scala/zio/query/Cache.scala b/zio-query/shared/src/main/scala/zio/query/Cache.scala index 413ccb00..b1dc0271 100644 --- a/zio-query/shared/src/main/scala/zio/query/Cache.scala +++ b/zio-query/shared/src/main/scala/zio/query/Cache.scala @@ -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]]] @@ -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]]] =