Improve code comments and rustdoc#40
Merged
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This PR addresses Issue #39 by improving wording, grammar, and clarity in rustdoc and test-module documentation, aiming to better align documentation with current behavior.
Changes:
- Refined and standardized test-module rustdoc comments for HTTP content tests (header whitelisting, request line correctness, compression).
- Updated public rustdoc across core library modules (client defaults, config options, live node discovery, query planning, keyrouting examples) for clarity and accuracy.
- Fixed/modernized example references in rustdoc (e.g., using
AlternatorConfig::builder()andAlternatorClient::from_conf).
Reviewed changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| tests/http_content/optimize_headers.rs | Reworded module-level docs describing header whitelist test coverage and rationale. |
| tests/http_content/correct_line.rs | Clarified module docs describing request-line validation behavior. |
| tests/http_content/common/http_test.rs | Improved documentation of the shared HTTP test harness and its usage patterns. |
| tests/http_content/body_compression.rs | Minor wording correction in the test-case list. |
| src/query_plan.rs | Clarified high-level description of how query planning is used per request. |
| src/live_nodes.rs | Improved rustdoc describing discovery/refresh behavior and start-up semantics. |
| src/keyrouting/affinity_config.rs | Updated rustdoc example to use current config/client construction APIs. |
| src/customize.rs | Updated rustdoc wording for the per-operation customization extension trait. |
| src/config.rs | Clarified rustdoc for header stripping and key-route-affinity builder docs. |
| src/compression.rs | Clarified compression threshold semantics in rustdoc/comments. |
| src/client.rs | Clarified client default behavior documentation and config construction wording. |
Comments suppressed due to low confidence (1)
src/customize.rs:11
- The rustdoc example passes
AlternatorConfig::builder().… .build()intoalternator_config_override(...), butalternator_config_overridetakesimpl Into<AlternatorBuilder>.AlternatorBuilder::build()returns anAlternatorConfig, and there is noFrom<AlternatorConfig> for AlternatorBuilder, so the example does not reflect the actual API (even if the block isignore). Remove the.build()call (or pass anAlternatorBuilderviaAlternatorConfig::builder()/config.to_builder()).
/// It allows overriding [AlternatorConfig] at the per-operation level, like so:
/// ```ignore
/// client
/// .create_table()
/// // ...
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
wprzytula
requested changes
Jun 11, 2026
Clean up wording, grammar, and clarity across public rustdoc and test-module comments. Align documentation with current behavior and fix inaccurate or outdated references and examples. Fixes scylladb#39.
wprzytula
approved these changes
Jun 11, 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.
Clean up wording, grammar, and clarity across public rustdoc and test-module comments. Align documentation with current behavior and fix inaccurate or outdated references and examples.
Fixes #39.