Repository navigation
Replace once_cell in geo_filters - #183
Merged
Merged
Conversation
Use std::sync::LazyLock for the evaluation parser cache. Keep once_cell as a dependency because the public Lookups trait exposes once_cell::sync::Lazy. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
The reviewed changes were examined across the affected files, and no actionable issues were identified.
No open issues 🎉
What changed in this PR
This PR replaces the private evaluation parser cache with std::sync::LazyLock while retaining once_cell for the public Lookups::get_lookups() API. It also simplifies full-group key iteration and updates the locked rstest version.
Changes:
- Uses
LazyLockfor the evaluation parser cache. - Iterates directly over initialized keys in full hash-map groups.
- Updates
rstestandrstest_macrosto version 0.28.0 in the lockfile.
No actionable issues were identified.
| File | Description |
|---|---|
| crates/hash-sorted-map/src/hash_sorted_map.rs | Simplifies iteration over keys in fully occupied hash-map groups. |
| crates/geo_filters/evaluation/accuracy.rs | Replaces the private once_cell parser cache with std::sync::LazyLock. |
| Cargo.lock | Updates the locked rstest and rstest_macros dependencies to version 0.28.0. |
Review effort: Lite (adaptive)
look
marked this pull request as draft
November 16, 2026 23:24
Bump geo_filters to 0.5.0 for the public Lookups API change. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Remove the redundant custom lookup test and split the standard library imports. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
look
marked this pull request as ready for review
November 16, 2026 23:46
tclem
self-requested a review
November 16, 2026 23:54
aneubeck
approved these changes
Nov 17, 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.
Replace
once_cell::sync::Lazywithstd::sync::LazyLockand remove the direct dependency.Breaking:
Lookups::get_lookups()now returnsLazyLock; bumpgeo_filtersto 0.5.0.Other changes required by CI:
hash-sorted-map.