Skip to content

Commit

Permalink
Avoid warning
Browse files Browse the repository at this point in the history
  • Loading branch information
propensive committed Oct 3, 2024
1 parent abee067 commit 0eb7d5c
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/core/xmlreader.scala
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,10 @@ object XmlDecoder extends Derivation[XmlDecoder]:
construct:
[FieldType] => context =>
val element =
elements.collect { case element: XmlAst.Element => element }
.find(_.name.name == label)
.get
elements.find:
case element: XmlAst.Element if element.name.name == label => true
case _ => false
.get

context.read(List(element))

Expand Down

0 comments on commit 0eb7d5c

Please sign in to comment.