Skip to content

Improve code comments and rustdoc#40

Merged
wprzytula merged 1 commit into
scylladb:masterfrom
m-szymon:comment-review
Jun 11, 2026
Merged

Improve code comments and rustdoc#40
wprzytula merged 1 commit into
scylladb:masterfrom
m-szymon:comment-review

Conversation

@m-szymon

Copy link
Copy Markdown
Collaborator

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.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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() and AlternatorClient::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() into alternator_config_override(...), but alternator_config_override takes impl Into<AlternatorBuilder>. AlternatorBuilder::build() returns an AlternatorConfig, and there is no From<AlternatorConfig> for AlternatorBuilder, so the example does not reflect the actual API (even if the block is ignore). Remove the .build() call (or pass an AlternatorBuilder via AlternatorConfig::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.

Comment thread src/keyrouting/affinity_config.rs
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 wprzytula merged commit 87580bc into scylladb:master Jun 11, 2026
2 checks passed
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.

Code Comment Quality Review

3 participants