Skip to content

[ISSUE #9329]🐛Fix client Clippy without DNS discovery - #9330

Merged
mxsm merged 1 commit into
mainfrom
mxsm/fix-9329-client-dns-clippy
Aug 13, 2026
Merged

[ISSUE #9329]🐛Fix client Clippy without DNS discovery#9330
mxsm merged 1 commit into
mainfrom
mxsm/fix-9329-client-dns-clippy

Conversation

@mxsm

@mxsm mxsm commented Aug 13, 2026

Copy link
Copy Markdown
Owner

Which Issue(s) This PR Fixes(Closes)

Brief Description

Use the feature-disabled DNS discovery error as the block's tail expression. This removes clippy::needless_return when nameserver-dns-discovery is disabled while preserving the existing ConfigInvalidValue behavior.

How Did You Test This Change?

Passed:

  • cargo fmt -p rocketmq-client-rust -- --check
  • cargo clippy -p rocketmq-client-rust --all-targets -- -D warnings
  • cargo clippy -p rocketmq-client-rust --all-targets --features nameserver-dns-discovery -- -D warnings
  • cargo clippy -p rocketmq-client-rust --all-targets --all-features -- -D warnings
  • cargo test -p rocketmq-client-rust --test client_runtime_ownership typed_dns_discovery_requires_its_opt_in_feature_before_client_start -- --exact
  • cargo clippy --workspace --no-deps --all-targets --all-features -- -D warnings
  • cargo fmt -p rocketmq-example -- --check
  • cargo clippy --all-targets -- -D warnings from rocketmq-example
  • The required SRE format check, cargo check --locked --workspace, strict Clippy, docs, source layout check, and execution dependency boundary check
  • git diff --check

The SRE all-features test run compiled the client successfully but stopped on two unrelated Windows STATUS_STACK_OVERFLOW failures in connector engine tests.

The root and example cargo fmt --all -- --check commands remain blocked on Windows by the pre-existing OS 206 aggregate command-line limit. The affected packages pass package-scoped format checks.

Summary by CodeRabbit

  • Refactor
    • Simplified internal error handling for nameserver discovery without changing runtime behavior or error messages.

@rocketmq-rust-robot rocketmq-rust-robot added the bug🐛 Something isn't working label Aug 13, 2026
@mxsm
mxsm merged commit ad9b675 into main Aug 13, 2026
15 of 22 checks passed
@mxsm
mxsm deleted the mxsm/fix-9329-client-dns-clippy branch August 13, 2026 06:50
@coderabbitai

coderabbitai Bot commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 21bb3d4a-c7c5-4018-b037-77f06a0287e4

📥 Commits

Reviewing files that changed from the base of the PR and between e7726c4 and 4c71dee.

📒 Files selected for processing (1)
  • rocketmq-client/src/factory/mq_client_instance.rs

Walkthrough

The feature-disabled NameServer discovery branch now returns its existing ConfigInvalidValue error as a tail expression. Runtime behavior remains unchanged, and the syntax avoids the strict Clippy needless_return error.

Changes

DNS discovery Clippy fix

Layer / File(s) Summary
Use the configuration error as a tail expression
rocketmq-client/src/factory/mq_client_instance.rs
The non-nameserver-dns-discovery branch replaces the explicit return with a tail expression while preserving the existing error.

Estimated code review effort: 1 (Trivial) | ~2 minutes

Possibly related PRs

Poem

A small syntax change,
Keeps the same error in flight,
Clippy hops away.
The DNS path stays steady,
Says the rabbit, “All right!”

✨ Finishing Touches 💡 1
🛠️ Fix failing CI checks 💡
  • Create stacked PR
  • Commit on current branch
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch mxsm/fix-9329-client-dns-clippy

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@rocketmq-rust-bot

Copy link
Copy Markdown
Collaborator

🔊@mxsm 🚀Thanks for your contribution🎉!

💡CodeRabbit(AI) will review your code first🔥!

Note

🚨The code review suggestions from CodeRabbit are to be used as a reference only, and the PR submitter can decide whether to make changes based on their own judgment. Ultimately, the project management personnel will conduct the final code review💥.

@rocketmq-rust-bot rocketmq-rust-bot added AI review first Ai review pr first auto merge ready to review waiting-review waiting review this PR approved PR has approved and removed ready to review waiting-review waiting review this PR labels Aug 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

AI review first Ai review pr first approved PR has approved auto merge bug🐛 Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug🐛] Fix client Clippy failure without DNS discovery

3 participants