Skip to content

Commit

Permalink
remove unused parameter (#2849)
Browse files Browse the repository at this point in the history
this is just clutter afaics

Co-authored-by: Nabil Abdel-Hafeez <7283535+987Nabil@users.noreply.github.com>
  • Loading branch information
mberndt123 and 987Nabil committed May 23, 2024
1 parent 9fcfd0f commit 40f24ce
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ final case class NettyClientDriver private[netty] (
channelFactory: ChannelFactory[Channel],
eventLoopGroup: EventLoopGroup,
nettyRuntime: NettyRuntime,
clientConfig: NettyConfig,
) extends ClientDriver {

override type Connection = Channel
Expand Down Expand Up @@ -187,15 +186,14 @@ final case class NettyClientDriver private[netty] (
object NettyClientDriver {
private implicit val trace: Trace = Trace.empty

val live: ZLayer[NettyConfig, Throwable, ClientDriver] =
val live: URLayer[EventLoopGroups.Config, ClientDriver] =
(EventLoopGroups.live ++ ChannelFactories.Client.live ++ NettyRuntime.live) >>>
ZLayer {
for {
eventLoopGroup <- ZIO.service[EventLoopGroup]
channelFactory <- ZIO.service[ChannelFactory[Channel]]
nettyRuntime <- ZIO.service[NettyRuntime]
clientConfig <- ZIO.service[NettyConfig]
} yield NettyClientDriver(channelFactory, eventLoopGroup, nettyRuntime, clientConfig)
} yield NettyClientDriver(channelFactory, eventLoopGroup, nettyRuntime)
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ private[zio] final case class NettyDriver(
channelFactory <- ChannelFactories.Client.live.build
.provideSomeEnvironment[Scope](_ ++ ZEnvironment[ChannelType.Config](nettyConfig))
nettyRuntime <- NettyRuntime.live.build
} yield NettyClientDriver(channelFactory.get, eventLoopGroup, nettyRuntime.get, nettyConfig)
} yield NettyClientDriver(channelFactory.get, eventLoopGroup, nettyRuntime.get)

override def toString: String = s"NettyDriver($serverConfig)"
}
Expand Down

0 comments on commit 40f24ce

Please sign in to comment.