Skip to content

Commit

Permalink
#388 - remove Scope from R parameter for liveZIO
Browse files Browse the repository at this point in the history
  • Loading branch information
regis-leray committed Jan 18, 2023
1 parent 83dc194 commit a7e3feb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion zio-s3/src/main/scala/zio/s3/package.scala
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ package object s3 {

def liveZIO[R](
region: Region,
provider: RIO[R with Scope, AwsCredentialsProvider],
provider: RIO[R, AwsCredentialsProvider],
uriEndpoint: Option[URI] = None
): ZLayer[R, S3Exception, S3] =
ZLayer.scoped[R](
Expand Down
6 changes: 3 additions & 3 deletions zio-s3/src/test/scala/zio/s3/S3Test.scala
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,10 @@ object S3TestSpec extends ZIOSpecDefault {

object InvalidS3LayerTestSpec extends ZIOSpecDefault {

private val s3: ZLayer[Any, S3Exception, S3] =
zio.s3.liveZIO[Any](Region.EU_CENTRAL_1, providers.default)
private val s3: ZLayer[Scope, S3Exception, S3] =
zio.s3.liveZIO(Region.EU_CENTRAL_1, providers.default)

override def spec: Spec[Any, Nothing] =
override def spec =
suite("InvalidS3LayerTest") {
test("listBuckets") {
listBuckets.provideLayer(s3).either.map(assert(_)(isLeft(isSubtype[S3Exception](anything))))
Expand Down

0 comments on commit a7e3feb

Please sign in to comment.