I recently upgraded to Scala 2.13, and now am being warned about a deprecation. My function looks like so:
implicit def convertGeneralResult[A <% ToResponseMarshallable, B <% ToResponseMarshallable](r: Either[A, B]) =
r.fold[ToResponseMarshallable](identity, identity)
The deprecation warning reads (I actually have two of them, one for each type parameter A/B):
view bounds are deprecated; use an implicit parameter instead.
example: instead ofdef f[A <% Int](a: A)
usedef f[A](a: A)(implicit ev: A => Int)
I'm not entirely sure how to apply the suggested fix in my case though.