Open
Description
Header.unapply
returns an Option
. From the compiler's point of view, this means that it can potentially fail - meaning a pattern match like this
header match {
case Header(_, _) => ???
}
is non-exhaustive, and triggers the corresponding compiler lint.
We can fix this by changing the return type of unapply
to Some[(String, String)]
- see this Scastie.