Skip to content

Commit

Permalink
Scala 2
Browse files Browse the repository at this point in the history
  • Loading branch information
sideeffffect committed May 29, 2024
1 parent cb9e0ef commit b6abcdc
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,10 @@ trait YamlDecoder[T] { self =>

final def orElse(that: => YamlDecoder[T]): YamlDecoder[T] = new YamlDecoder[T] {
override def construct(node: Node)(implicit settings: LoadSettings): Either[ConstructError, T] =
self.construct(node) match
self.construct(node) match {
case Right(result) => result
case Left(_) => that.construct(node)
}
}
}

Expand Down

0 comments on commit b6abcdc

Please sign in to comment.