Skip to content
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

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ghosind
Copy link
Owner

@ghosind ghosind commented Dec 25, 2024

#4

Signed-off-by: Chen Su <ghosind@gmail.com>
@ghosind ghosind added the enhancement New feature or request label Dec 25, 2024
@ghosind ghosind added this to the v0.3.1 milestone Dec 25, 2024
@ghosind ghosind requested a review from Copilot December 25, 2024 07:52
Copy link

codecov bot commented Dec 25, 2024

Codecov Report

Attention: Patch coverage is 0% with 53 lines in your changes missing coverage. Please review.

Project coverage is 82.68%. Comparing base (62cca07) to head (7235568).

Files with missing lines Patch % Lines
set/sync_set.go 0.00% 29 Missing ⚠️
set/hash_set.go 0.00% 20 Missing ⚠️
set/concurrent_hashset.go 0.00% 4 Missing ⚠️
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.
📢 Have feedback on the report? Share it here.

Copy link

@Copilot Copilot AI left a 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")
Copy link
Preview

Copilot AI Dec 25, 2024

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.

Positive Feedback
Negative Feedback

Provide additional feedback

Please help us improve GitHub Copilot by sharing more details about this comment.

Please select one or more of the options

// 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")
Copy link
Preview

Copilot AI Dec 25, 2024

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.

Positive Feedback
Negative Feedback

Provide additional feedback

Please help us improve GitHub Copilot by sharing more details about this comment.

Please select one or more of the options
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant