Repository navigation
Extract heap helpers into a shared module - #1139
Merged
Merged
Conversation
Signed-off-by: Gauravpawar101 <Gauravpawar2522@gmail.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #1139 +/- ##
==========================================
- Coverage 94.38% 93.71% -0.68%
==========================================
Files 48 53 +5
Lines 6665 6458 -207
==========================================
- Hits 6291 6052 -239
- Misses 374 406 +32 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Contributor
Author
|
None of them is mine except fmt. |
phimuemue
enabled auto-merge
November 13, 2026 09:25
Merged
via the queue into
rust-itertools:master
with commit Nov 13, 2026
8b4c6cb
8 of 14 checks passed
Member
|
Thanks for this. I always find it confusing to pass a It is a matter of taste, but what I usually do for these is this:
If you want, open a follow-up PR with these changes. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #1108
kmerge_impl.rsandk_smallest.rseach had their own heap code. This movesheapifyandsift_downintosrc/heap.rsand uses them in both places.PS
I kept the
sift_downfromkmerge_impl.rssince it was written to bebranchless. It's a min-heap, so
k_smallest_generalnow passes a "greaterthan" predicate to get the largest element on top, like before.