Skip to content

Expose strategy::utils per-axis search helpers for custom strategies - #35

Merged
kylecarow merged 2 commits into
mainfrom
strategy/expose-utils-helpers
Aug 7, 2026
Merged

Expose strategy::utils per-axis search helpers for custom strategies#35
kylecarow merged 2 commits into
mainfrom
strategy/expose-utils-helpers

Conversation

@kylecarow

Copy link
Copy Markdown
Collaborator

Follow-up to #22: exact_index, locate_step_index, locate_lower_index_uniform,
check_uniform_grid, and AxisLocation/locate_axis were pub(crate) even though
they're the actual primitives Linear/LinearUniform/Step/StepLower/StepUpper
are built from. Widened all to pub so custom strategies can reuse them instead of
reimplementing from scratch.

check_uniform_grid's error message hardcoded "LinearUniform:" regardless of
caller; generalized now that other strategies can call it directly.

Non-breaking, purely additive visibility change.

Test plan

  • cargo build
  • cargo test / cargo test --doc
  • cargo clippy --all-targets
  • cargo fmt --check
  • cargo doc --no-deps

exact_index, locate_step_index, locate_lower_index_uniform,
check_uniform_grid, and AxisLocation/locate_axis were pub(crate), even
though they're the actual primitives Linear/LinearUniform/Step/StepLower/
StepUpper are built from. Widen all to pub so custom strategies can reuse
them instead of reimplementing from scratch.

check_uniform_grid's error message hardcoded "LinearUniform:" regardless
of caller; generalized now that other strategies can call it directly.
… docs

Denied by CI's -D warnings on cargo doc: [Type](super::Type) is redundant
when the label alone already resolves to the same intra-doc target.
@kylecarow
kylecarow merged commit 02fa443 into main Aug 7, 2026
1 check passed
@kylecarow
kylecarow deleted the strategy/expose-utils-helpers branch August 7, 2026 07:09
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.

1 participant