Skip to content

Replace once_cell in geo_filters - #183

Merged
gorzell merged 5 commits into
mainfrom
look/replace-once-cell
Nov 17, 2026
Merged

gorzell merged 5 commits into
mainfrom
look/replace-once-cell

Conversation

@look

@look look commented Nov 16, 2026 •

Copy link
Copy Markdown
Member

Replace once_cell::sync::Lazy with std::sync::LazyLock and remove the direct dependency.

Breaking: Lookups::get_lookups() now returns LazyLock; bump geo_filters to 0.5.0.

Other changes required by CI:

  • Refresh the stale Cargo.lock file.
  • Fix a lint error in hash-sorted-map.

look and others added 3 commits November 16, 2026 13:07
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>
@look
look marked this pull request as ready for review November 16, 2026 23:21
@look
look requested a review from a team as a code owner November 16, 2026 23:21
Copilot AI adaptive review requested due to automatic review settings November 16, 2026 23:21

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 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 LazyLock for the evaluation parser cache.
  • Iterates directly over initialized keys in full hash-map groups.
  • Updates rstest and rstest_macros to 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
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>
@look look changed the title Replace private once_cell lazy with std Replace once_cell in geo_filters Nov 16, 2026
Remove the redundant custom lookup test and split the standard library imports.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@look
look marked this pull request as ready for review November 16, 2026 23:46
@tclem
tclem self-requested a review November 16, 2026 23:54
@tclem
tclem removed their request for review November 17, 2026 06:18
@gorzell
gorzell merged commit 0f21538 into main Nov 17, 2026
9 checks passed
@gorzell
gorzell deleted the look/replace-once-cell branch November 17, 2026 09:10
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.

4 participants