-
Notifications
You must be signed in to change notification settings - Fork 0
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
Add RemoveIf and RetainAll methods to collections #6
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Chen Su <ghosind@gmail.com>
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #6 +/- ##
==========================================
- Coverage 86.67% 82.68% -4.00%
==========================================
Files 15 15
Lines 1096 1149 +53
==========================================
Hits 950 950
- Misses 107 160 +53
Partials 39 39 ☔ View full report in Codecov by Sentry. |
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.
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
@@ -154,6 +154,16 @@ func (set *ConcurrentHashSet[T]) RemoveAll(c ...T) bool { | |||
return isChanged | |||
} | |||
|
|||
// RemoveIf removes all of the elements of this set that satisfy the given predicate. | |||
func (set *ConcurrentHashSet[T]) RemoveIf(filter func(T) bool) bool { | |||
panic("not implemented") |
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.
The method RemoveIf is not implemented and will cause a runtime panic. Please implement this method.
Copilot is powered by AI, so mistakes are possible. Review output carefully before use.
|
||
// RetainAll retains only the elements in this set that are contained in the specified collection. | ||
func (set *ConcurrentHashSet[T]) RetainAll(c ...T) bool { | ||
panic("not implemented") |
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.
The method RetainAll is not implemented and will cause a runtime panic. Please implement this method.
Copilot is powered by AI, so mistakes are possible. Review output carefully before use.
#4