format source with scalafmt
This commit is contained in:
parent
0f40491d42
commit
ce404e4f53
1669 changed files with 43208 additions and 35404 deletions
|
|
@ -21,23 +21,14 @@ class SubstreamDocSpec extends AkkaSpec {
|
|||
//#groupBy2
|
||||
|
||||
//#groupBy3
|
||||
Source(1 to 10)
|
||||
.groupBy(3, _ % 3)
|
||||
.mergeSubstreams
|
||||
.runWith(Sink.ignore)
|
||||
Source(1 to 10).groupBy(3, _ % 3).mergeSubstreams.runWith(Sink.ignore)
|
||||
//#groupBy3
|
||||
|
||||
//#groupBy4
|
||||
Source(1 to 10)
|
||||
.groupBy(3, _ % 3)
|
||||
.mergeSubstreamsWithParallelism(2)
|
||||
.runWith(Sink.ignore)
|
||||
Source(1 to 10).groupBy(3, _ % 3).mergeSubstreamsWithParallelism(2).runWith(Sink.ignore)
|
||||
|
||||
//concatSubstreams is equivalent to mergeSubstreamsWithParallelism(1)
|
||||
Source(1 to 10)
|
||||
.groupBy(3, _ % 3)
|
||||
.concatSubstreams
|
||||
.runWith(Sink.ignore)
|
||||
Source(1 to 10).groupBy(3, _ % 3).concatSubstreams.runWith(Sink.ignore)
|
||||
//#groupBy4
|
||||
}
|
||||
|
||||
|
|
@ -51,8 +42,8 @@ class SubstreamDocSpec extends AkkaSpec {
|
|||
//#wordCount
|
||||
val text =
|
||||
"This is the first line.\n" +
|
||||
"The second line.\n" +
|
||||
"There is also the 3rd line\n"
|
||||
"The second line.\n" +
|
||||
"There is also the 3rd line\n"
|
||||
|
||||
val charCount = Source(text.toList)
|
||||
.splitAfter { _ == '\n' }
|
||||
|
|
@ -66,15 +57,11 @@ class SubstreamDocSpec extends AkkaSpec {
|
|||
|
||||
"generate substreams by flatMapConcat and flatMapMerge" in {
|
||||
//#flatMapConcat
|
||||
Source(1 to 2)
|
||||
.flatMapConcat(i => Source(List.fill(3)(i)))
|
||||
.runWith(Sink.ignore)
|
||||
Source(1 to 2).flatMapConcat(i => Source(List.fill(3)(i))).runWith(Sink.ignore)
|
||||
//#flatMapConcat
|
||||
|
||||
//#flatMapMerge
|
||||
Source(1 to 2)
|
||||
.flatMapMerge(2, i => Source(List.fill(3)(i)))
|
||||
.runWith(Sink.ignore)
|
||||
Source(1 to 2).flatMapMerge(2, i => Source(List.fill(3)(i))).runWith(Sink.ignore)
|
||||
//#flatMapMerge
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue