Skip to content

Commit 2a1dcf1

Browse files
Update scalafmt-core to 3.8.1 (#383)
* Update scalafmt-core to 3.8.1 * Reformat with scalafmt 3.8.1 Executed command: scalafmt --non-interactive * Add 'Reformat with scalafmt 3.8.1' to .git-blame-ignore-revs --------- Co-authored-by: scala-steward <scala-steward>
1 parent 3e2693c commit 2a1dcf1

File tree

4 files changed

+12
-5
lines changed

4 files changed

+12
-5
lines changed

.git-blame-ignore-revs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Scala Steward: Reformat with scalafmt 3.8.1
2+
499baded20f959dca86ad7a24d2244b7241de8c3

.scalafmt.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
runner.dialect = scala3
2-
version = 3.7.17
2+
version = 3.8.1
33
maxColumn = 120

pekko/src/main/scala/sttp/capabilities/pekko/PekkoStreams.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ object PekkoStreams extends PekkoStreams {
1515
def limitBytes(stream: Source[ByteString, Any], maxBytes: Long): Source[ByteString, Any] = {
1616
stream
1717
.limitWeighted(maxBytes)(_.length.toLong)
18-
.mapError {
19-
case _: pekko.stream.StreamLimitReachedException => StreamMaxLengthExceededException(maxBytes)
18+
.mapError { case _: pekko.stream.StreamLimitReachedException =>
19+
StreamMaxLengthExceededException(maxBytes)
2020
}
2121
}
2222
}

pekko/src/test/scala/sttp/capabilities/pekko/PekkoStreamsTest.scala

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,12 @@ class PekkoStreamsTest extends AnyFlatSpec with Matchers with BeforeAndAfterAll
3636
val stream = PekkoStreams.limitBytes(inputStream, maxBytes)
3737

3838
// then
39-
stream.fold(0L)((acc, bs) => acc + bs.length).runWith(TestSink[Long]()).request(1).expectNext(inputByteCount.toLong).expectComplete()
39+
stream
40+
.fold(0L)((acc, bs) => acc + bs.length)
41+
.runWith(TestSink[Long]())
42+
.request(1)
43+
.expectNext(inputByteCount.toLong)
44+
.expectComplete()
4045
}
4146

4247
it should "Fail stream if limit is exceeded" in {
@@ -51,7 +56,7 @@ class PekkoStreamsTest extends AnyFlatSpec with Matchers with BeforeAndAfterAll
5156
Source.fromIterator(() => iterator.grouped(chunkSize).map(group => ByteString(group.toArray)))
5257

5358
// when
54-
val stream = PekkoStreams.limitBytes(inputStream, maxBytes)
59+
val stream = PekkoStreams.limitBytes(inputStream, maxBytes)
5560
val probe = stream.runWith(TestSink[ByteString]())
5661
val _ = for (_ <- 1 to 31) yield probe.requestNext()
5762

0 commit comments

Comments
 (0)