Repository navigation
[MOD-19077] Share the pattern-filtered trie iterator between triemap_ffi and tag_index - #11618
Merged
Merged
Conversation
gdesmott
force-pushed
the
gdesmott-trie-pattern-iter
branch
from
September 29, 2026 12:31
e4aa354 to
75d8831
Compare
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #11618 +/- ##
==========================================
- Coverage 84.24% 83.53% -0.72%
==========================================
Files 640 665 +25
Lines 85448 86566 +1118
Branches 39264 40355 +1091
==========================================
+ Hits 71988 72311 +323
- Misses 13094 13881 +787
- Partials 366 374 +8
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
gdesmott
force-pushed
the
gdesmott-trie-pattern-iter
branch
from
September 29, 2026 13:16
75d8831 to
8bdab5b
Compare
gdesmott
force-pushed
the
gdesmott-trie-pattern-iter
branch
from
September 30, 2026 09:48
8bdab5b to
8e7f36e
Compare
Move the runtime-selected prefix/contains/suffix/wildcard lending iterator out of triemap_ffi into trie_rs as PatternLendingIter, built through TrieMap::pattern_lending_iter, so Rust callers can walk a trie by pattern without going through the TrieMapIterator C ABI. The suffix filter now carries its pattern instead of a boxed closure.
Replace the crate's own copy of the mode-dispatching lending iterator with trie_rs's PatternLendingIter, and re-export PatternMode as IterMode so the crate's API is unchanged.
gdesmott
force-pushed
the
gdesmott-trie-pattern-iter
branch
from
September 30, 2026 12:29
8e7f36e to
613c08c
Compare
|
JonasKruckenberg
approved these changes
Oct 5, 2026
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.



Describe the changes in the pull request
triemap_ffiandtag_indexeach carry their own copy of the same runtime-selected prefix/contains/suffix/wildcard lending iterator over aTrieMap, and Rust code that wants a pattern walk over a C-owned trie has to go through theTrieMapIteratorC ABI.trie_rsasPatternLendingIter, built withTrieMap::pattern_lending_iter(pattern, PatternMode). Both crates use it;tag_indexre-exportsPatternModeasIterMode, so its API is unchanged.TrieMap_IterateWithFilter/TrieMapIterator_*.This will allow #11206 to use this code without depending on the
fficrate.Main objects this PR modified
trie_rs::iter::PatternLendingIter/PatternMode— new shared iterator; suffix mode now carries its pattern instead of a boxed closure.triemap_ffiTrieMapIterator— wraps the shared iterator; its private copy and therqe_wildcarddependency are gone.tag_index::TagIndexIterator— wraps the shared iterator; its private copy is gone. The contains variant is now boxed here too, as it already was intriemap_ffi.Mark if applicable
Release Notes