From b99bd4830047de9e3be39baae61687f556cb9b5c Mon Sep 17 00:00:00 2001 From: Milad Khajavi Date: Mon, 6 Jan 2025 11:50:11 +0330 Subject: [PATCH] fmt. --- .../scala/example/websocket/WebSocketClientAdvanced.scala | 7 ++++--- .../src/main/scala/example/websocket/WebSocketEcho.scala | 1 + .../example/websocket/WebSocketReconnectingClient.scala | 1 + .../scala/example/websocket/WebSocketServerAdvanced.scala | 6 +++--- .../scala/example/websocket/WebSocketSimpleClient.scala | 1 + 5 files changed, 10 insertions(+), 6 deletions(-) diff --git a/zio-http-example/src/main/scala/example/websocket/WebSocketClientAdvanced.scala b/zio-http-example/src/main/scala/example/websocket/WebSocketClientAdvanced.scala index 1ae10335c..8247b0195 100644 --- a/zio-http-example/src/main/scala/example/websocket/WebSocketClientAdvanced.scala +++ b/zio-http-example/src/main/scala/example/websocket/WebSocketClientAdvanced.scala @@ -1,11 +1,12 @@ package example.websocket +import scala.annotation.nowarn + import zio._ + import zio.http.ChannelEvent.Read import zio.http._ -import scala.annotation.nowarn - -object WebSocketSimpleClient extends ZIOAppDefault { +object WebSocketSimpleClientAdvanced extends ZIOAppDefault { def sendChatMessage(message: String): ZIO[Queue[String], Throwable, Unit] = ZIO.serviceWithZIO[Queue[String]](_.offer(message).unit) diff --git a/zio-http-example/src/main/scala/example/websocket/WebSocketEcho.scala b/zio-http-example/src/main/scala/example/websocket/WebSocketEcho.scala index eefd0809d..0ba5dc00f 100644 --- a/zio-http-example/src/main/scala/example/websocket/WebSocketEcho.scala +++ b/zio-http-example/src/main/scala/example/websocket/WebSocketEcho.scala @@ -1,6 +1,7 @@ package example.websocket import zio._ + import zio.http.ChannelEvent.Read import zio.http._ import zio.http.codec.PathCodec.string diff --git a/zio-http-example/src/main/scala/example/websocket/WebSocketReconnectingClient.scala b/zio-http-example/src/main/scala/example/websocket/WebSocketReconnectingClient.scala index f671f8862..599ac554e 100644 --- a/zio-http-example/src/main/scala/example/websocket/WebSocketReconnectingClient.scala +++ b/zio-http-example/src/main/scala/example/websocket/WebSocketReconnectingClient.scala @@ -1,6 +1,7 @@ package example.websocket import zio._ + import zio.http.ChannelEvent.{ExceptionCaught, Read, UserEvent, UserEventTriggered} import zio.http._ diff --git a/zio-http-example/src/main/scala/example/websocket/WebSocketServerAdvanced.scala b/zio-http-example/src/main/scala/example/websocket/WebSocketServerAdvanced.scala index 93f5dd221..19a98f343 100644 --- a/zio-http-example/src/main/scala/example/websocket/WebSocketServerAdvanced.scala +++ b/zio-http-example/src/main/scala/example/websocket/WebSocketServerAdvanced.scala @@ -1,12 +1,13 @@ package example.websocket +import scala.annotation.nowarn + import zio._ + import zio.http.ChannelEvent.{ExceptionCaught, Read, UserEvent, UserEventTriggered} import zio.http._ import zio.http.codec.PathCodec.string -import scala.annotation.nowarn - object WebSocketServerAdvanced extends ZIOAppDefault { val socketApp: WebSocketApp[Any] = @@ -59,4 +60,3 @@ object WebSocketServerAdvanced extends ZIOAppDefault { override val run = Server.serve(routes).provide(Server.default) } - diff --git a/zio-http-example/src/main/scala/example/websocket/WebSocketSimpleClient.scala b/zio-http-example/src/main/scala/example/websocket/WebSocketSimpleClient.scala index 9ad83a504..798935e6c 100644 --- a/zio-http-example/src/main/scala/example/websocket/WebSocketSimpleClient.scala +++ b/zio-http-example/src/main/scala/example/websocket/WebSocketSimpleClient.scala @@ -1,6 +1,7 @@ package example.websocket import zio._ + import zio.http.ChannelEvent.{Read, UserEvent, UserEventTriggered} import zio.http._