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

Remove unused type param from Cache#lookup #490

Merged
merged 1 commit into from
Jun 25, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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