From 063f37d957ec75bc41cb2cc1b478244d8e5171c1 Mon Sep 17 00:00:00 2001 From: prascuna Date: Sun, 20 Mar 2016 17:15:26 +0000 Subject: [PATCH 1/2] Fix type of tweets Source #authors-filter-map won't compile otherwise --- .../scala/code/docs/stream/TwitterStreamQuickstartDocSpec.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/akka-docs/rst/scala/code/docs/stream/TwitterStreamQuickstartDocSpec.scala b/akka-docs/rst/scala/code/docs/stream/TwitterStreamQuickstartDocSpec.scala index 388e161b8f..a158949d18 100644 --- a/akka-docs/rst/scala/code/docs/stream/TwitterStreamQuickstartDocSpec.scala +++ b/akka-docs/rst/scala/code/docs/stream/TwitterStreamQuickstartDocSpec.scala @@ -55,7 +55,7 @@ class TwitterStreamQuickstartDocSpec extends AkkaSpec { trait Example0 { //#tweet-source - val tweets: Source[Tweet, Unit] + val tweets: Source[Tweet, NotUsed] //#tweet-source } From c61eb62395bceb817635f75e08203982a65d57e4 Mon Sep 17 00:00:00 2001 From: Paolo Rascuna Date: Sun, 20 Mar 2016 22:43:19 +0000 Subject: [PATCH 2/2] #tweet-source now is bound to the actual impl --- .../docs/stream/TwitterStreamQuickstartDocSpec.scala | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/akka-docs/rst/scala/code/docs/stream/TwitterStreamQuickstartDocSpec.scala b/akka-docs/rst/scala/code/docs/stream/TwitterStreamQuickstartDocSpec.scala index a158949d18..818368a044 100644 --- a/akka-docs/rst/scala/code/docs/stream/TwitterStreamQuickstartDocSpec.scala +++ b/akka-docs/rst/scala/code/docs/stream/TwitterStreamQuickstartDocSpec.scala @@ -31,7 +31,10 @@ object TwitterStreamQuickstartDocSpec { val akka = Hashtag("#akka") //#model - val tweets = Source( + //#tweet-source + val tweets: Source[Tweet, NotUsed] + //#tweet-source + = Source( Tweet(Author("rolandkuhn"), System.currentTimeMillis, "#akka rocks!") :: Tweet(Author("patriknw"), System.currentTimeMillis, "#akka !") :: Tweet(Author("bantonsson"), System.currentTimeMillis, "#akka !") :: @@ -53,12 +56,6 @@ class TwitterStreamQuickstartDocSpec extends AkkaSpec { // Disable println def println(s: Any): Unit = () - trait Example0 { - //#tweet-source - val tweets: Source[Tweet, NotUsed] - //#tweet-source - } - trait Example1 { //#first-sample //#materializer-setup