- Notifications
You must be signed in to change notification settings - Fork1k
chore: remove duplicates using the symmetric difference function#14469
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
Emyrk commentedAug 28, 2024 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
This stack of pull requests is managed by Graphite.Learn more about stacking. |
d3aa5c4
toccbe85e
Compare5af8f78
to1cc418c
Compareccbe85e
tobbcfc01
Compare1cc418c
to0a49b38
Comparebbcfc01
toba492b2
Compare369b2dc
to2d5e40d
Compare2d5e40d
to028476d
Compare028476d
to6889229
Comparecpy:=make([]T,0,len(a)) | ||
for_,v:=rangea { | ||
ifContainsCompare(cpy,v,equal) { |
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.
Why the repeated iteration? Can you not just keep amap[T]struct{}
around? Or are you trying to avoid thecomparable
constraint?
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.
I am trying to avoid thecomparable
constraint because the RBAC usesRoleIdentifier
structs which are not comparable 😢.
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.
Gotcha. We probably want to be careful that we don't use this for too large a slice then.
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.
Yea, atm the slices are in the order of 5-10 elements
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.
Approving to unblock.
6dbfe6f
intomainUh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Just limiting the diff of the giant organization sync PR.
The
SymmetricDifferenceFunc
used to include duplicates, which was incorrect.