Skip to content
This repository was archived by the owner on Oct 24, 2024. It is now read-only.

Commit 1d5205c

Browse files
committed
README: Fix codec example
1 parent b354153 commit 1d5205c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -97,14 +97,14 @@ Toml.parseAs[Root]("a = 1") // Right(Root(1, None))
9797
```scala
9898
case class Currency(name: String)
9999
implicit val currencyCodec: Codec[Currency] = Codec {
100-
case (Value.Str(value), _) =>
100+
case (Value.Str(value), _, _) =>
101101
value match {
102102
case "EUR" => Right(Currency("EUR"))
103103
case "BTC" => Right(Currency("BTC"))
104-
case _ => Left((List.empty, s"Invalid currency: $value"))
104+
case _ => Left((List(), s"Invalid currency: $value"))
105105
}
106106

107-
case (value, _) => Left((List.empty, s"Currency expected, $value provided"))
107+
case (value, _, _) => Left((List(), s"Currency expected, $value provided"))
108108
}
109109

110110
case class Root(currency: Currency)

0 commit comments

Comments
 (0)