Skip to content

Commit

Permalink
Drop unneeded with Scopes (#601)
Browse files Browse the repository at this point in the history
These are leftover from #594, and unnecessarily constrain the
environment types.
  • Loading branch information
earldouglas authored Mar 28, 2022
1 parent ddf34c1 commit 61a23d3
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ trait JsonDecoderPlatformSpecific[A] { self: JsonDecoder[A] =>
final def decodeJsonStreamInput[R](
stream: ZStream[R, Throwable, Byte],
charset: Charset = StandardCharsets.UTF_8
): ZIO[R with Scope, Throwable, A] =
): ZIO[R, Throwable, A] =
ZIO.scoped[R] {
stream.toInputStream
.flatMap(is =>
Expand All @@ -48,7 +48,7 @@ trait JsonDecoderPlatformSpecific[A] { self: JsonDecoder[A] =>
*
* @see also [[decodeJsonStreamInput]]
*/
final def decodeJsonStream[R](stream: ZStream[R, Throwable, Char]): ZIO[R with Scope, Throwable, A] =
final def decodeJsonStream[R](stream: ZStream[R, Throwable, Char]): ZIO[R, Throwable, A] =
ZIO.scoped[R](stream.toReader.flatMap(readAll))

final def decodeJsonPipeline(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import java.nio.file.Paths

object DecoderPlatformSpecificSpec extends ZIOSpecDefault {

def spec: Spec[TestEnvironment with Scope, TestFailure[Any], TestSuccess] =
def spec: Spec[TestEnvironment, TestFailure[Any], TestSuccess] =
suite("Decoder")(
test("excessively nested structures") {
// JVM specific: getResourceAsString not yet supported
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import testzio.json.data.geojson.generated._
import testzio.json.data.googlemaps._
import testzio.json.data.twitter._
import zio.Chunk
import zio.Scope
import zio.json.ast.Json
import zio.stream.ZStream
import zio.test.Assertion._
Expand All @@ -18,7 +17,7 @@ import java.nio.file.Files
object EncoderPlatformSpecificSpec extends ZIOSpecDefault {
import testzio.json.DecoderSpec.logEvent._

def spec: Spec[TestEnvironment with Scope, TestFailure[Any], TestSuccess] =
def spec: Spec[TestEnvironment, TestFailure[Any], TestSuccess] =
suite("Encoder")(
suite("roundtrip")(
testRoundTrip[DistanceMatrix]("google_maps_api_response"),
Expand Down

0 comments on commit 61a23d3

Please sign in to comment.