Skip to content

Commit

Permalink
Remove Unnecessary Dependency (#2477)
Browse files Browse the repository at this point in the history
* remove unnecessary dependency

* fix compilation errors

* format

* fix tests

* format
  • Loading branch information
adamgfraser authored Oct 12, 2023
1 parent f5c67c3 commit f962297
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
1 change: 0 additions & 1 deletion project/plugins.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ addSbtPlugin("pl.project13.scala" % "sbt-jmh" % "0.4.6")
addSbtPlugin("com.timushev.sbt" % "sbt-updates" % "0.6.3")
addSbtPlugin("io.spray" % "sbt-revolver" % "0.10.0")
addSbtPlugin("com.github.sbt" % "sbt-github-actions" % "0.17.0")
addSbtPlugin("ch.epfl.scala" % "sbt-scala3-migrate" % "0.6.1")
addSbtPlugin("com.github.sbt" % "sbt-ci-release" % "1.5.12")
addSbtPlugin("dev.zio" % "zio-sbt-website" % "0.3.10")
addSbtPlugin("de.heikoseeberger" % "sbt-header" % "5.10.0")
Expand Down
2 changes: 1 addition & 1 deletion zio-http/src/main/scala/zio/http/Header.scala
Original file line number Diff line number Diff line change
Expand Up @@ -4325,7 +4325,7 @@ object Header {

def parse(value: String): Either[String, WWWAuthenticate] =
Try {
val challengeRegEx(scheme, challenge) = value
val challengeRegEx(scheme, challenge) = value: @unchecked
val params = auth
.findAllMatchIn(challenge)
.map { m =>
Expand Down
2 changes: 1 addition & 1 deletion zio-http/src/main/scala/zio/http/Path.scala
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import zio.{Chunk, ChunkBuilder}
* whether there are leading and trailing slashes in the path. This allows for a
* combination of precision and performance and supports a rich API.
*/
final case class Path private (flags: Path.Flags, segments: Chunk[String]) { self =>
final case class Path private[http] (flags: Path.Flags, segments: Chunk[String]) { self =>
import Path.{Flag, Flags}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ import io.netty.channel.{Channel, ChannelFactory, ChannelHandler, EventLoopGroup
import io.netty.handler.codec.http.websocketx.{WebSocketClientProtocolHandler, WebSocketFrame => JWebSocketFrame}
import io.netty.handler.codec.http.{FullHttpRequest, HttpObjectAggregator}

final case class NettyClientDriver private (
final case class NettyClientDriver private[netty] (
channelFactory: ChannelFactory[Channel],
eventLoopGroup: EventLoopGroup,
nettyRuntime: NettyRuntime,
Expand Down
5 changes: 3 additions & 2 deletions zio-http/src/test/scala/zio/http/FormSpec.scala
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,8 @@ object FormSpec extends ZIOHttpSpec {
form <- Form.fromMultipartBytes(multipartFormBytes1)
encoding = form.multipartBytes(boundary)
bytes <- encoding.runCollect
(text: FormField.Text) :: (image1: FormField.Binary) :: (image2: FormField.Binary) :: Nil = form.formData.toList
(text: FormField.Text) :: (image1: FormField.Binary) :: (image2: FormField.Binary) :: Nil =
form.formData.toList: @unchecked
} yield assert(bytes)(equalTo(multipartFormBytes1)) &&
assert(form.formData.size)(equalTo(3)) &&
assert(text.name)(equalTo("submit-name")) &&
Expand Down Expand Up @@ -197,7 +198,7 @@ object FormSpec extends ZIOHttpSpec {
.runCollect
.map { formData =>
val (text: FormField.Text) :: (image1: FormField.Binary) :: (image2: FormField.Binary) :: Nil =
formData.toList
formData.toList: @unchecked
assert(formData.size)(equalTo(3)) &&
assert(text.name)(equalTo("submit-name")) &&
assert(text.value)(equalTo("Larry")) &&
Expand Down

0 comments on commit f962297

Please sign in to comment.