-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Parse as embed update if parsing as message fails #37
Conversation
Closes #32 |
Codecov Report
@@ Coverage Diff @@
## master #37 +/- ##
==========================================
+ Coverage 50.37% 50.62% +0.24%
==========================================
Files 59 60 +1
Lines 397 399 +2
==========================================
+ Hits 200 202 +2
Misses 197 197
Continue to review full report at Codecov.
|
) extends Update | ||
|
||
implicit val config: Configuration = Configuration.default.withSnakeCaseMemberNames | ||
implicit val updateDecoder: Decoder[Update] = Decoder[Message].map(Edit).widen[Update] or deriveConfiguredDecoder[EmbedUpdate].widen[Update] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Interesting. So widen basically casts to a supertype?
Also, where does this or
come from? Is that from circe?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ya I actually want to understand it better because I forgot what makes it legal , remind me to ask in Gitter tomorrow. Ya the or
comes from Circe 👍
No description provided.