Make unary_request internal-only (closes #200)#201
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #201 +/- ##
==========================================
+ Coverage 85.61% 85.68% +0.06%
==========================================
Files 15 15
Lines 6481 6481
==========================================
+ Hits 5549 5553 +4
+ Misses 932 928 -4 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
unary_request was compiled for the server feature but only used by the client API and by server tests, causing Clippy to report the function as unused in non-test server builds. Tighten the cfg to only build unary_request when the client feature is enabled or when running tests with the server feature: #[cfg(any(feature = "client", all(test, feature = "server")))] Verified with clippy and cargo test. Change in src/lib.rs.
Contributor
Author
|
I reviewed the Codecov report (informational — coverage is unchanged and all modified lines are covered) and investigated the CI failure from the What I found
What I changed
Verification
Result
Thanks for the pointer — let me know if you want the cfg applied differently or prefer a comment explaining why the gate is narrow. |
msk
approved these changes
May 30, 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.
This PR removes unary_request from the public API and makes it
crate-internal (pub(crate)). The function is no longer intended for
external use and internal callers continue to use crate::unary_request
without changes.
Changes
Why
Reducing the public API surface clarifies the supported interfaces and
encourages use of the typed helpers (for example, client::Connection and
server::Connection) instead of a raw unary_request entrypoint.
Verification
Migration
If any downstream crate used review_protocol::unary_request directly,
switch to the higher-level APIs (client::Connection, server::Connection,
etc.).
See also: #200
Closes #200