Skip to content

Commit 78e17e5

Browse files
committed
remove trailing whitespace
1 parent f74bfef commit 78e17e5

3 files changed

Lines changed: 6004 additions & 18 deletions

File tree

site/getstarted/install.md

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,4 @@ Then it is recommended to install s2n and openssl. On macOS for example, this ca
6161

6262
```sh
6363
brew install openssl s2n
64-
```
65-
66-
67-
68-
69-
64+
```

site/guide.md

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -422,13 +422,7 @@ Stream.range(1,10).scan(0)(_ + _).toList // running sum
422422

423423
FS2 comes with lots of concurrent operations. The `merge` function runs two streams concurrently, combining their outputs. It halts when both inputs have halted:
424424

425-
```scala mdoc:fail
426-
import cats.effect.IO
427-
428-
Stream(1,2,3).merge(Stream.eval(IO { Thread.sleep(200); 4 })).compile.toVector.unsafeRunSync()
429-
```
430-
431-
Oops, we need a `cats.effect.unsafe.IORuntime` in implicit scope. Let's add that:
425+
We need a `cats.effect.unsafe.IORuntime` in implicit scope. Let's add that:
432426

433427
```scala mdoc
434428
import cats.effect.IO
@@ -441,7 +435,7 @@ The `merge` function supports concurrency. FS2 has a number of other useful conc
441435

442436
Depending on how you want to halt the resulting stream, you can use either of the three variants of the `merge` method: `mergeHaltR`, `mergeHaltL`, and `mergeHaltBoth`. The resulting stream will terminate whenever the right stream halts, the left stream halts, or the stream on either side halts, respectively:
443437

444-
```scala
438+
```scala
445439
val finite = Stream('a', 'b', 'c', 'd', 'e').covary[IO]
446440
val infinite = Stream.iterate(0)(_ + 1).covary[IO]
447441

@@ -462,17 +456,17 @@ Since it is quite common to terminate one stream as soon as the other is finishe
462456
import cats.effect.std.{Queue, Random}
463457
import scala.concurrent.duration._
464458

465-
def producer(queue: Queue[IO, Option[Int]])(implicit rnd: Random[IO]): Stream[IO, Option[Int]] =
459+
def producer(queue: Queue[IO, Option[Int]])(implicit rnd: Random[IO]): Stream[IO, Option[Int]] =
466460
Stream
467461
.repeatEval(Random[IO].betweenInt(100,800))
468462
.evalTap(n => IO.println(s"Produced: $n"))
469463
.flatMap(t => Stream.sleep[IO](t.milliseconds) >> Stream.emit(if (t >= 750) None else Some(t)))
470464
.evalTap(queue.offer)
471465

472-
def consumer(queue: Queue[IO, Option[Int]]): Stream[IO, Unit] =
466+
def consumer(queue: Queue[IO, Option[Int]]): Stream[IO, Unit] =
473467
Stream.fromQueueNoneTerminated(queue, 10).evalMap(n => IO.println(s"Consumed: $n"))
474468

475-
val concurrentlyDemo =
469+
val concurrentlyDemo =
476470
Stream.eval(Queue.bounded[IO, Option[Int]](20)).flatMap { queue =>
477471
Stream.eval(Random.scalaUtilRandom[IO]).flatMap { implicit rnd =>
478472

@@ -505,7 +499,7 @@ import java.io.InputStream
505499

506500
def getConnectionStream(url: URL): IO[InputStream] = IO(url.openConnection().getInputStream())
507501

508-
// The Adventures of Tom Sawyer by Mark Twain
502+
// The Adventures of Tom Sawyer by Mark Twain
509503
val bookParts = Stream(
510504
"7193/pg7193.txt", // Part 1
511505
"7194/pg7194.txt", // Part 2

0 commit comments

Comments
 (0)