Skip to content

Commit 96e378d

Browse files
committed
use fs2 flow interop instead of reactivestreams
1 parent eaeefa4 commit 96e378d

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

core/src/main/scala/mongo4cats/helpers.scala

+4-3
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,9 @@ package mongo4cats
1818

1919
import cats.effect.Async
2020
import fs2.Stream
21-
import fs2.interop.reactivestreams
21+
import fs2.interop.flow
2222
import org.reactivestreams.Publisher
23+
import org.reactivestreams.FlowAdapters
2324

2425
object helpers {
2526

@@ -36,9 +37,9 @@ object helpers {
3637
boundedStream(1).compile.drain
3738

3839
def stream[F[_]: Async]: Stream[F, T] =
39-
reactivestreams.fromPublisher(publisher, DefaultStreamChunkSize)
40+
flow.fromPublisher(FlowAdapters.toFlowPublisher(publisher), DefaultStreamChunkSize)
4041

4142
def boundedStream[F[_]: Async](chunkSize: Int): Stream[F, T] =
42-
reactivestreams.fromPublisher(publisher, chunkSize)
43+
flow.fromPublisher(FlowAdapters.toFlowPublisher(publisher), chunkSize)
4344
}
4445
}

0 commit comments

Comments
 (0)