Skip to content

Commit

Permalink
Fix warns.
Browse files Browse the repository at this point in the history
  • Loading branch information
zhongl committed Nov 27, 2023
1 parent cabfec0 commit 37d64fe
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions src/main/scala/webot/as.scala
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down
2 changes: 1 addition & 1 deletion src/main/scala/webot/element.scala
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit 37d64fe

Please sign in to comment.