Skip to content

Commit

Permalink
format
Browse files Browse the repository at this point in the history
  • Loading branch information
adamgfraser committed Jul 26, 2023
1 parent ca7a400 commit 9918257
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
16 changes: 8 additions & 8 deletions zio-http/src/main/scala/zio/http/Channel.scala
Original file line number Diff line number Diff line change
Expand Up @@ -56,15 +56,15 @@ trait Channel[-In, +Out] { self =>
*/
final def contramap[In2](f: In2 => In): Channel[In2, Out] =
new Channel[In2, Out] {
def awaitShutdown: UIO[Unit] =
def awaitShutdown: UIO[Unit] =
self.awaitShutdown
def receive: Task[Out] =
def receive: Task[Out] =
self.receive
def send(in: In2): Task[Unit] =
def send(in: In2): Task[Unit] =
self.send(f(in))
def sendAll(in: Iterable[In2]): Task[Unit] =
self.sendAll(in.map(f))
def shutdown: UIO[Unit] =
def shutdown: UIO[Unit] =
self.shutdown
}

Expand All @@ -74,15 +74,15 @@ trait Channel[-In, +Out] { self =>
*/
final def map[Out2](f: Out => Out2): Channel[In, Out2] =
new Channel[In, Out2] {
def awaitShutdown: UIO[Unit] =
def awaitShutdown: UIO[Unit] =
self.awaitShutdown
def receive: Task[Out2] =
def receive: Task[Out2] =
self.receive.map(f)
def send(in: In): Task[Unit] =
def send(in: In): Task[Unit] =
self.send(in)
def sendAll(in: Iterable[In]): Task[Unit] =
self.sendAll(in)
def shutdown: UIO[Unit] =
def shutdown: UIO[Unit] =
self.shutdown
}

Expand Down
8 changes: 4 additions & 4 deletions zio-http/src/main/scala/zio/http/WebSocketChannel.scala
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,11 @@ private[http] object WebSocketChannel {
queue: Queue[WebSocketChannelEvent],
): WebSocketChannel =
new WebSocketChannel {
def awaitShutdown: UIO[Unit] =
def awaitShutdown: UIO[Unit] =
nettyChannel.awaitClose
def receive: Task[WebSocketChannelEvent] =
def receive: Task[WebSocketChannelEvent] =
queue.take
def send(in: WebSocketChannelEvent): Task[Unit] =
def send(in: WebSocketChannelEvent): Task[Unit] =
in match {
case Read(message) => nettyChannel.writeAndFlush(frameToNetty(message))
case _ => ZIO.unit
Expand All @@ -45,7 +45,7 @@ private[http] object WebSocketChannel {
case Read(message) => nettyChannel.write(frameToNetty(message))
case _ => ZIO.unit
} *> nettyChannel.flush
def shutdown: UIO[Unit] =
def shutdown: UIO[Unit] =
nettyChannel.close(false).orDie
}

Expand Down

0 comments on commit 9918257

Please sign in to comment.