Replace FoldSink with sink (#31003)

This commit is contained in:
Muskan Gupta 2021-12-20 13:48:28 +05:30 committed by GitHub
parent 78df739ef6
commit 467a46d2db
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -41,7 +41,7 @@ class FlowDocSpec extends AkkaSpec with CompileOnlySpec {
// connect the Source to the Sink, obtaining a RunnableGraph
val runnable: RunnableGraph[Future[Int]] = source.toMat(sink)(Keep.right)
// materialize the flow and get the value of the FoldSink
// materialize the flow and get the value of the sink
val sum: Future[Int] = runnable.run()
//#materialization-in-steps
@ -64,7 +64,7 @@ class FlowDocSpec extends AkkaSpec with CompileOnlySpec {
val runnable: RunnableGraph[Future[Int]] =
Source(1 to 10).toMat(sink)(Keep.right)
// get the materialized value of the FoldSink
// get the materialized value of the sink
val sum1: Future[Int] = runnable.run()
val sum2: Future[Int] = runnable.run()