diff --git a/build.sbt b/build.sbt index 870dd20..57845a6 100644 --- a/build.sbt +++ b/build.sbt @@ -1,7 +1,7 @@ name := "scalafix-test" libraryDependencies := List( - "co.fs2" %% "fs2-core" % "0.10.7", + "co.fs2" %% "fs2-core" % "1.0.5", "org.http4s" %% "http4s-core" % "0.18.24", "org.http4s" %% "http4s-dsl" % "0.18.24" ) diff --git a/src/main/scala/Hello.scala b/src/main/scala/Hello.scala index 8a53047..1123989 100644 --- a/src/main/scala/Hello.scala +++ b/src/main/scala/Hello.scala @@ -1,8 +1,9 @@ import cats.effect.IO -import fs2.StreamApp import fs2.StreamApp.ExitCode +import cats.effect.{ ExitCode, IOApp } +import cats.syntax.functor._ -object Hello extends StreamApp[IO] { - override def stream(args: List[String], requestShutdown: IO[Unit]): fs2.Stream[IO, ExitCode] = - fs2.Stream(ExitCode.Success).covary[IO] +object Hello extends IOApp { + override def run(args: List[String] ): IO[ExitCode] = + fs2.Stream(ExitCode.Success).covary[IO].compile.drain.as(ExitCode.Success) }