Skip to content

fix(treeset): fix RemoveFunc not remove all matched node (#63)#64

Merged
shoenig merged 2 commits intohashicorp:mainfrom
zonewave:fix_remove
May 13, 2023
Merged

fix(treeset): fix RemoveFunc not remove all matched node (#63)#64
shoenig merged 2 commits intohashicorp:mainfrom
zonewave:fix_remove

Conversation

@zonewave
Copy link
Copy Markdown
Contributor

  1. add a filterSlice method that returns the elements of s that satisfy the predicate as a slice, in order.
  2. first find remove ids by filterSlice, secondly to remove by removeSlice

then I find other bug:

infix can't stop when return in left node, and can to visist other node;
for example, I write a test, it can't stop in 8 .so I fix it.

Pasted image 20230512171745

@zonewave zonewave force-pushed the fix_remove branch 3 times, most recently from 17b8c30 to 22daadf Compare May 12, 2023 09:36
zonewave added 2 commits May 12, 2023 17:37
1. add a filterSlice method that returns the elements of s that satisfy the predicate as a slice, in order.
2. first find remove ids by filterSlice, secondly to remove by removeSlice
Copy link
Copy Markdown
Contributor

@shoenig shoenig left a comment

Choose a reason for hiding this comment

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

LGTM; thanks @zonewave!

@shoenig shoenig merged commit b5d8a46 into hashicorp:main May 13, 2023
@zonewave zonewave deleted the fix_remove branch October 23, 2023 12:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants