Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Make sure it is sorted after removals that make bucket empty (#23)
After discovering an issue with priority sorting in Flame, I dug down until I was able to narrow the issue down to the OrderedSet instance. In this specific situation, it appears the set does not maintain ordering between elements. It seems that remove failed to remove empty buckets when it was the last element in the bucket, resulting in an invalid ordering between buckets in specific situations. I modified remove to delete empty sets instead. Aside from making the new test pass, the code actually broke an existing test. On reading it, I believe the expected condition was incorrect. I fixed the test to the actual expected condition, allowing it to pass.
- Loading branch information