From 37d64fe0f3546b8997c1981d0cd948b8d324bcc6 Mon Sep 17 00:00:00 2001 From: zhongl Date: Mon, 27 Nov 2023 16:17:38 +0800 Subject: [PATCH] Fix warns. --- src/main/scala/webot/as.scala | 8 ++++---- src/main/scala/webot/element.scala | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/main/scala/webot/as.scala b/src/main/scala/webot/as.scala index c3823b5..5e94f33 100644 --- a/src/main/scala/webot/as.scala +++ b/src/main/scala/webot/as.scala @@ -6,16 +6,16 @@ trait As[A] { object As { def apply[A](implicit ins: As[A]): As[A] = ins - implicit val asBoolean = new As[Boolean] { + implicit val asBoolean: As[Boolean] = new As[Boolean] { def from(value: String) = value.toBoolean } - implicit val asByte = new As[Byte] { + implicit val asByte: As[Byte] = new As[Byte] { def from(value: String) = value.toByte } - implicit val asInt = new As[Int] { + implicit val asInt: As[Int] = new As[Int] { def from(value: String) = value.toInt } - implicit val asDouble = new As[Double] { + implicit val asDouble: As[Double] = new As[Double] { def from(value: String) = value.toDouble } diff --git a/src/main/scala/webot/element.scala b/src/main/scala/webot/element.scala index c29efa0..c6ebc9d 100644 --- a/src/main/scala/webot/element.scala +++ b/src/main/scala/webot/element.scala @@ -12,7 +12,7 @@ object Element { def apply[A](op: Operator[A]): ControlOr[A] = instance.apply(self).apply(op) } - implicit def asElementOps[A](a: A)(implicit e: Element[A]) = new Ops[A] { + implicit def asElementOps[A](a: A)(implicit e: Element[A]): Ops[A] = new Ops[A] { val self = a val instance = e }