Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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

Merged
Emyrk merged 1 commit intomainfromstevenmasley/slice_unique
Aug 29, 2024

Conversation

Emyrk
Copy link
Member

@EmyrkEmyrk commentedAug 28, 2024
edited
Loading

Just limiting the diff of the giant organization sync PR.

TheSymmetricDifferenceFunc used to include duplicates, which was incorrect.

@EmyrkGraphite App
Copy link
MemberAuthor

Emyrk commentedAug 28, 2024
edited
Loading

@EmyrkEmyrkforce-pushed thestevenmasley/organizations_query branch fromd3aa5c4 toccbe85eCompareAugust 28, 2024 14:41
@EmyrkEmyrkforce-pushed thestevenmasley/slice_unique branch from5af8f78 to1cc418cCompareAugust 28, 2024 14:41
@EmyrkEmyrkforce-pushed thestevenmasley/organizations_query branch fromccbe85e tobbcfc01CompareAugust 28, 2024 14:44
@EmyrkEmyrkforce-pushed thestevenmasley/slice_unique branch from1cc418c to0a49b38CompareAugust 28, 2024 14:44
@EmyrkEmyrk changed the titlechore: implement unique function for sliceschore: symmetric difference function to remove duplicatesAug 28, 2024
@EmyrkEmyrk changed the titlechore: symmetric difference function to remove duplicateschore: remove duplicates using the symmetric difference functionAug 28, 2024
@EmyrkEmyrk marked this pull request as ready for reviewAugust 28, 2024 14:46
@EmyrkEmyrkforce-pushed thestevenmasley/organizations_query branch frombbcfc01 toba492b2CompareAugust 28, 2024 16:22
@EmyrkEmyrkforce-pushed thestevenmasley/slice_unique branch 2 times, most recently from369b2dc to2d5e40dCompareAugust 28, 2024 16:29
@EmyrkEmyrk requested a review fromjohnstcnAugust 28, 2024 16:38
@EmyrkEmyrk changed the base branch fromstevenmasley/organizations_query tographite-base/14469August 28, 2024 18:24
@EmyrkEmyrkforce-pushed thestevenmasley/slice_unique branch from2d5e40d to028476dCompareAugust 28, 2024 18:24
@EmyrkEmyrk changed the base branch fromgraphite-base/14469 tomainAugust 28, 2024 18:25
@EmyrkEmyrkforce-pushed thestevenmasley/slice_unique branch from028476d to6889229CompareAugust 28, 2024 19:34
cpy:=make([]T,0,len(a))

for_,v:=rangea {
ifContainsCompare(cpy,v,equal) {
Copy link
Member

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?

Copy link
MemberAuthor

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 😢.

Copy link
Member

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.

Copy link
MemberAuthor

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

Copy link
Member

@johnstcnjohnstcn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Approving to unblock.

@EmyrkEmyrk merged commit6dbfe6f intomainAug 29, 2024
28 checks passed
@EmyrkEmyrk deleted the stevenmasley/slice_unique branchAugust 29, 2024 02:06
@github-actionsgithub-actionsbot locked and limited conversation to collaboratorsAug 29, 2024
Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.

Reviewers

@johnstcnjohnstcnjohnstcn approved these changes

Assignees

@EmyrkEmyrk

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

2 participants

@Emyrk@johnstcn

[8]ページ先頭

©2009-2025 Movatter.jp