From 2a3605045a843854a9d6fda75c23d607cb4dcb9b Mon Sep 17 00:00:00 2001 From: Arman Bilge Date: Sat, 24 Sep 2022 16:48:38 -0700 Subject: [PATCH] Make `Port.{MinValue, MaxValue}` constant defs --- shared/src/main/scala/com/comcast/ip4s/Port.scala | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/shared/src/main/scala/com/comcast/ip4s/Port.scala b/shared/src/main/scala/com/comcast/ip4s/Port.scala index 37dfc965..6c1ebab8 100644 --- a/shared/src/main/scala/com/comcast/ip4s/Port.scala +++ b/shared/src/main/scala/com/comcast/ip4s/Port.scala @@ -39,8 +39,8 @@ final class Port private (val value: Int) extends Product with Serializable with } object Port { - val MinValue: Int = 0 - val MaxValue: Int = 65535 + final val MinValue = 0 + final val MaxValue = 65535 def fromInt(value: Int): Option[Port] = if (value >= MinValue && value <= MaxValue) Some(new Port(value)) else None