-
-
Notifications
You must be signed in to change notification settings - Fork 217
Provide the most specific implicit for IsEmpty
on iterables
#1355
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
Conversation
WalkthroughThe changes generalize the Changes
Sequence Diagram(s)sequenceDiagram
participant Test as Test Suite
participant Matcher as beEmpty Matcher
participant IsEmpty as IsEmpty Typeclass
Test->>Matcher: assert(emptyContainer should beEmpty)
Matcher->>IsEmpty: isEmpty(emptyContainer)
IsEmpty-->>Matcher: Boolean result
Matcher-->>Test: Assertion result
Estimated code review effort🎯 2 (Simple) | ⏱️ ~7 minutes Possibly related PRs
Suggested reviewers
Poem
Note ⚡️ Unit Test Generation is now available in beta!Learn more here, or try it out under "Finishing Touches" below. 📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (2)
🔇 Additional comments (2)
✨ Finishing Touches🧪 Generate unit tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
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.
Nice generalization, thanks!
Hi! I want to support this use case:
Since
Matcher
is not covariant, the rhs of must fails right now asIsEmpty[IterableOnce[?]]
is not aIsEmpty[Map[K, V]]
. I think this change is okay to fix it. Hoping it does not break binary compatibility.This is a follow-up to #1345.
Summary by CodeRabbit
Tests
Refactor