From 0f655df0d4eaa33574c701d8037004525758ee3c Mon Sep 17 00:00:00 2001 From: Kyri Petrou Date: Wed, 10 Jul 2024 14:38:45 +0300 Subject: [PATCH] Cleanups --- .../shared/src/main/scala/zio/query/internal/QueryScope.scala | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/zio-query/shared/src/main/scala/zio/query/internal/QueryScope.scala b/zio-query/shared/src/main/scala/zio/query/internal/QueryScope.scala index 53a2a8d..074c513 100644 --- a/zio-query/shared/src/main/scala/zio/query/internal/QueryScope.scala +++ b/zio-query/shared/src/main/scala/zio/query/internal/QueryScope.scala @@ -8,7 +8,7 @@ import java.util.concurrent.atomic.AtomicReference /** * Lightweight variant of [[zio.Scope]], optimized for usage with ZQuery */ -private[query] sealed abstract class QueryScope { +sealed trait QueryScope { def addFinalizerExit(f: Exit[Any, Any] => UIO[Any])(implicit trace: Trace): UIO[Unit] def closeAndExitWith[E, A](exit: Exit[E, A])(implicit trace: Trace): IO[E, A] } @@ -21,7 +21,7 @@ private[query] object QueryScope { def closeAndExitWith[E, A](exit: Exit[E, A])(implicit trace: Trace): IO[E, A] = exit } - final class Default extends QueryScope { + final private class Default extends QueryScope { private val ref = new AtomicReference(List.empty[Exit[Any, Any] => UIO[Any]]) def addFinalizerExit(f: Exit[Any, Any] => UIO[Any])(implicit trace: Trace): UIO[Unit] =