Skip to content

Commit

Permalink
Reformat with scalafmt 3.8.2
Browse files Browse the repository at this point in the history
Executed command: scalafmt --non-interactive
  • Loading branch information
scala-steward committed Jun 16, 2024
1 parent 03de037 commit 2a8af05
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ import cats.effect.SyncIO
import scodec.bits._
import fs2._


@OutputTimeUnit(TimeUnit.MICROSECONDS)
@BenchmarkMode(Array(Mode.AverageTime))
@State(org.openjdk.jmh.annotations.Scope.Benchmark)
Expand All @@ -35,14 +34,16 @@ import fs2._
class MsgPackItemParserBenchmarks {

// The file contains hex representation of the values so we have to convert it
val msgpackBytes: ByteVector = ByteVector.fromHex(
fs2.io
.readClassLoaderResource[SyncIO]("twitter_msgpack.txt", 4096)
.through(fs2.text.utf8.decode)
.compile
.string
.unsafeRunSync()
).get
val msgpackBytes: ByteVector = ByteVector
.fromHex(
fs2.io
.readClassLoaderResource[SyncIO]("twitter_msgpack.txt", 4096)
.through(fs2.text.utf8.decode)
.compile
.string
.unsafeRunSync()
)
.get

@Benchmark
def parseMsgpackItems() =
Expand Down
12 changes: 7 additions & 5 deletions xml/src/test/scala/fs2/data/xml/XmlExceptionSpec.scala
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,13 @@ object XmlExceptionSpec extends SimpleIOSuite {

expect(stream.compile.toList match {
case Right(
List(Right(XmlEvent.StartDocument),
Right(XmlEvent.StartTag(QName(None, "a"), Nil, false)),
Right(XmlEvent.StartTag(QName(None, "b"), Nil, false)),
Right(XmlEvent.XmlString("c", false)),
Left(_: XmlException))) =>
List(
Right(XmlEvent.StartDocument),
Right(XmlEvent.StartTag(QName(None, "a"), Nil, false)),
Right(XmlEvent.StartTag(QName(None, "b"), Nil, false)),
Right(XmlEvent.XmlString("c", false)),
Left(_: XmlException)
)) =>
true
case _ => false
})
Expand Down

0 comments on commit 2a8af05

Please sign in to comment.