Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove unused parameter #2849

Merged
merged 2 commits into from
May 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading