Skip to content

breaking: make matcher and backend internals private - #312

Merged
FalkWoldmann merged 2 commits into
httpmock:masterfrom
danieleades:agent/hide-matcher-internals
Sep 27, 2026
Merged

FalkWoldmann merged 2 commits into
httpmock:masterfrom
danieleades:agent/hide-matcher-internals

Conversation

@danieleades

Copy link
Copy Markdown
Contributor

The matcher engine is publicly reachable even though its trait depends on private request-requirement and mismatch types and the server builds a fixed matcher set. Make server::matchers crate-private, keep its comparator and reader modules private, and restrict the adapter and HTTP-client internals to the modules that use them.

This is the visibility prerequisite split from #290. Existing type names and module layout are retained; #290 will carry the naming proposal on top of this commit.

Breaking change: public paths under httpmock::server::matchers disappear, with no replacement extension API. The changelog records this. Runtime behavior is unchanged.

A scoped clippy::upper_case_acronyms allowance preserves the existing KeyValueOperator names: hiding the module makes Clippy start checking those previously exported names. The naming proposal removes the allowance when it changes the variants.

Validation:

  • cargo fmt --all -- --check
  • cargo clippy --offline --all-targets --all-features
  • cargo clippy --offline --all-targets --no-default-features
  • cargo test --offline --all-features --lib — 134 passed
  • RUSTDOCFLAGS="-D warnings" cargo doc --offline --all-features --no-deps
  • git diff --check

@codecov

codecov Bot commented Sep 21, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@FalkWoldmann
FalkWoldmann merged commit 3571eab into httpmock:master Sep 27, 2026
13 checks passed
FalkWoldmann added a commit to danieleades/httpmock that referenced this pull request Sep 27, 2026
Also fixes what master broke without conflicts: gate the cookie readers now that httpmock#297 made cookies optional, drop the KeyValueOperator variants nothing constructs since httpmock#312 made matchers private, and remove a TryInto import the redundant_imports lint from httpmock#316 rejects.
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.

2 participants