Skip to content

Commit b48f6ea

Browse files
committed
Reformat with latest scalafmt
1 parent f3ad084 commit b48f6ea

File tree

38 files changed

+80
-80
lines changed

38 files changed

+80
-80
lines changed

compat-akka/src/main/scala/io/bullet/borer/compat/akka.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ object akka {
167167
def readBytes(length: Long, pp: Input.PaddingProvider[ByteString]): ByteString = {
168168
val remaining = (byteString.length - _cursor).toLong
169169
val len = math.min(remaining, length).toInt
170-
val bytes =
170+
val bytes =
171171
if (len > 0) {
172172
val c = _cursor
173173
_cursor = c + len

compat-akka/src/main/scala/io/bullet/borer/compat/akkaHttp.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ trait AkkaHttpCompat {
170170
final def borerStreamUnmarshaller[T: Decoder](
171171
ess: EntityStreamingSupport): FromEntityUnmarshaller[Source[T, NotUsed]] =
172172
Unmarshaller.withMaterializer { implicit ec => implicit mat =>
173-
val unmarshalSync = (byteString: ByteString) => Json.decode(byteString.toArray[Byte]).to[T].value
173+
val unmarshalSync = (byteString: ByteString) => Json.decode(byteString.toArray[Byte]).to[T].value
174174
val unmarshallingFlow =
175175
if (ess.parallelism > 1) {
176176
val unmarshalAsync = (byteString: ByteString) => Future(unmarshalSync(byteString))
@@ -206,7 +206,7 @@ trait AkkaHttpCompat {
206206
classTag: ClassTag[T]): ToEntityMarshaller[Source[T, NotUsed]] = {
207207

208208
type Marshallings = List[Marshalling[MessageEntity]]
209-
val contentType = ess.contentType
209+
val contentType = ess.contentType
210210
val selectMarshalling: Marshallings => Option[() => MessageEntity] =
211211
contentType match {
212212
case _: ContentType.Binary | _: ContentType.WithFixedCharset | _: ContentType.WithMissingCharset =>

compat-akka/src/test/scala/io/bullet/borer/compat/AkkaHttpSupportSpec.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ class AkkaHttpSupportSpec extends BorerSuite {
7070
}
7171

7272
test("prefer JSON on equal q-value (by default)") {
73-
val foo = Foo("bar")
73+
val foo = Foo("bar")
7474
val acceptHeader = _root_.akka.http.scaladsl.model.headers.Accept(
7575
MediaRange.One(`application/json`, 1.0f),
7676
MediaRanges.`*/*`

compat-cats/src/main/scala/io/bullet/borer/compat/cats.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ object cats {
3636
implicit def iorDecoder[A: Decoder, B: Decoder]: Decoder[Ior[A, B]] =
3737
Decoder { r =>
3838
var breakExpected = false
39-
val open = if (r.tryReadArrayStart()) { breakExpected = true; -1L }
39+
val open = if (r.tryReadArrayStart()) { breakExpected = true; -1L }
4040
else r.readArrayHeader()
4141
val result =
4242
r.readInt() match {
@@ -107,7 +107,7 @@ object cats {
107107
implicit def validatedDecoder[E: Decoder, A: Decoder]: Decoder[Validated[E, A]] =
108108
Decoder { r =>
109109
val breakExpected = r.tryReadArrayStart() || { r.readMapHeader(1); false }
110-
val result =
110+
val result =
111111
r.readInt() match {
112112
case 0 => Validated.Invalid(r.read[E]())
113113
case 1 => Validated.Valid(r.read[A]())

compat-circe/src/main/scala/io/bullet/borer/compat/circe.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ object circe {
9999
import DataItem.{Shifts => DIS}
100100

101101
private[this] val arrayDecoder = Decoder.fromFactory(this, implicitly[Factory[Json, Vector[Json]]])
102-
private[this] val mapDecoder =
102+
private[this] val mapDecoder =
103103
Decoder { r =>
104104
val buf = new scala.collection.mutable.ArrayBuilder.ofRef[(String, Json)]
105105
if (r.hasMapHeader)

compat-pekko/src/main/scala/io/bullet/borer/compat/pekko.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ object pekko {
167167
def readBytes(length: Long, pp: Input.PaddingProvider[ByteString]): ByteString = {
168168
val remaining = (byteString.length - _cursor).toLong
169169
val len = math.min(remaining, length).toInt
170-
val bytes =
170+
val bytes =
171171
if (len > 0) {
172172
val c = _cursor
173173
_cursor = c + len

compat-pekko/src/main/scala/io/bullet/borer/compat/pekkoHttp.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ trait PekkoHttpCompat {
174174
final def borerStreamUnmarshaller[T: Decoder](
175175
ess: EntityStreamingSupport): FromEntityUnmarshaller[Source[T, NotUsed]] =
176176
Unmarshaller.withMaterializer { implicit ec => implicit mat =>
177-
val unmarshalSync = (byteString: ByteString) => Json.decode(byteString.toArray[Byte]).to[T].value
177+
val unmarshalSync = (byteString: ByteString) => Json.decode(byteString.toArray[Byte]).to[T].value
178178
val unmarshallingFlow =
179179
if (ess.parallelism > 1) {
180180
val unmarshalAsync = (byteString: ByteString) => Future(unmarshalSync(byteString))
@@ -210,7 +210,7 @@ trait PekkoHttpCompat {
210210
classTag: ClassTag[T]): ToEntityMarshaller[Source[T, NotUsed]] = {
211211

212212
type Marshallings = List[Marshalling[MessageEntity]]
213-
val contentType = ess.contentType
213+
val contentType = ess.contentType
214214
val selectMarshalling: Marshallings => Option[() => MessageEntity] =
215215
contentType match {
216216
case _: ContentType.Binary | _: ContentType.WithFixedCharset | _: ContentType.WithMissingCharset =>

compat-pekko/src/test/scala/io/bullet/borer/compat/PekkoHttpSupportSpec.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ class PekkoHttpSupportSpec extends BorerSuite {
7070
}
7171

7272
test("prefer JSON on equal q-value (by default)") {
73-
val foo = Foo("bar")
73+
val foo = Foo("bar")
7474
val acceptHeader = _root_.org.apache.pekko.http.scaladsl.model.headers.Accept(
7575
MediaRange.One(`application/json`, 1.0f),
7676
MediaRanges.`*/*`
@@ -114,7 +114,7 @@ class PekkoHttpSupportSpec extends BorerSuite {
114114
}
115115

116116
test("stream marshalling (JSON)") {
117-
val nums = List(Num(1), Num(2), Num(3))
117+
val nums = List(Num(1), Num(2), Num(3))
118118
val acceptHeader =
119119
_root_.org.apache.pekko.http.scaladsl.model.headers.Accept(MediaRange.One(`application/json`, 1.0f))
120120
Marshal(nums)

compat-scodec/src/main/scala/io/bullet/borer/compat/scodec.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ object scodec {
141141
def readBytes(length: Long, pp: Input.PaddingProvider[ByteVector]) = {
142142
val remaining = byteVector.length - _cursor
143143
val len = math.min(remaining, length)
144-
val bytes =
144+
val bytes =
145145
if (len > 0) {
146146
val c = _cursor
147147
_cursor = c + len

core/.jvm/src/main/scala/io/bullet/borer/internal/Unsafe.scala

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ object Unsafe:
8585
if (source.length > 0)
8686
val copySource =
8787
if (this.byteOrder != byteOrder)
88-
val array = new Array[Short](source.length)
88+
val array = new Array[Short](source.length)
8989
@tailrec def rec(ix: Int): Array[Short] =
9090
if (ix < array.length)
9191
array(ix) = java.lang.Short.reverseBytes(source(ix))
@@ -102,7 +102,7 @@ object Unsafe:
102102
if (source.length > 0)
103103
val copySource =
104104
if (this.byteOrder != byteOrder)
105-
val array = new Array[Int](source.length)
105+
val array = new Array[Int](source.length)
106106
@tailrec def rec(ix: Int): Array[Int] =
107107
if (ix < array.length)
108108
array(ix) = java.lang.Integer.reverseBytes(source(ix))
@@ -119,7 +119,7 @@ object Unsafe:
119119
if (source.length > 0)
120120
val copySource =
121121
if (this.byteOrder != byteOrder)
122-
val array = new Array[Long](source.length)
122+
val array = new Array[Long](source.length)
123123
@tailrec def rec(ix: Int): Array[Long] =
124124
if (ix < array.length)
125125
array(ix) = java.lang.Long.reverseBytes(source(ix))

0 commit comments

Comments
 (0)