Skip to content

Commit

Permalink
Remove pointless ZIO.environment[Any] from Server (zio#1605)
Browse files Browse the repository at this point in the history
rm pointless ZIO.environment[Any] call
  • Loading branch information
swoogles authored Oct 4, 2022
1 parent c353f67 commit 3b56a3e
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions zio-http/src/main/scala/zio/http/Server.scala
Original file line number Diff line number Diff line change
Expand Up @@ -67,14 +67,12 @@ object Server {

override def port: Int = bindPort

private def setErrorCallback(errorCallback: Option[ErrorCallback])(implicit trace: Trace): UIO[Unit] = {
({
ZIO
.environment[Any]
} *> driver.setErrorCallback(errorCallback))
private def setErrorCallback(errorCallback: Option[ErrorCallback])(implicit trace: Trace): UIO[Unit] =
driver
.setErrorCallback(errorCallback)
.unless(errorCallback.isEmpty)
.map(_.getOrElse(()))
}

}

}

0 comments on commit 3b56a3e

Please sign in to comment.