Skip to content

Conversation

@oopscompiled
Copy link
Contributor

@oopscompiled oopscompiled commented Feb 3, 2026

Which Issue(s) This PR Fixes(Closes)

Brief Description

How Did You Test This Change?

Summary by CodeRabbit

  • Chores
    • Removed unused commented-out code from protocol headers.

Note: This is a maintenance update with no changes to user-facing functionality or public APIs.

Copilot AI review requested due to automatic review settings February 3, 2026 20:43
@rocketmq-rust-bot
Copy link
Collaborator

🔊@oopscompiled 🚀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💥.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 3, 2026

Walkthrough

Removes commented-out trait implementations (CommandCustomHeader::to_map and FromMap) from the AddWritePermOfBrokerResponseHeader struct. This eliminates dead code with no impact to public APIs or functionality.

Changes

Cohort / File(s) Summary
Dead Code Removal
rocketmq-remoting/src/protocol/header/namesrv/perm_broker_header.rs
Removed 26 lines of commented-out CommandCustomHeader trait implementations for AddWritePermOfBrokerResponseHeader. Public methods (new, get_add_topic_count) remain unchanged.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Poem

🐰 A rabbit hops through dusty code,
Finding comments on the road,
With twitching nose, it spies the waste—
Deleted swift, removed with haste!
Clean code shines, the path is clear,
One less ghost to disappear! ✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly references the issue #5722 and accurately describes the main change: removing useless code from perm_broker_header.rs, which aligns with the actual code removal.
Linked Issues check ✅ Passed The pull request successfully addresses the linked issue #5722 by removing the commented-out implementations of CommandCustomHeader::to_map and FromMap, fulfilling the enhancement requirement.
Out of Scope Changes check ✅ Passed All changes in the pull request are scoped to removing commented code from perm_broker_header.rs as specified in issue #5722, with no extraneous modifications.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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 and usage tips.

Copy link
Contributor

Copilot AI left a comment

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 cleans up perm_broker_header.rs by removing obsolete, commented-out implementations associated with AddWritePermOfBrokerResponseHeader, improving readability and reducing noise.

Changes:

  • Removed commented-out CommandCustomHeader implementation for AddWritePermOfBrokerResponseHeader.
  • Removed commented-out FromMap implementation for AddWritePermOfBrokerResponseHeader.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@codecov
Copy link

codecov bot commented Feb 3, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 40.53%. Comparing base (56810e4) to head (e4c349e).
⚠️ Report is 15 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6039      +/-   ##
==========================================
- Coverage   40.54%   40.53%   -0.01%     
==========================================
  Files         881      881              
  Lines      122549   122549              
==========================================
- Hits        49682    49671      -11     
- Misses      72867    72878      +11     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Collaborator

@rocketmq-rust-bot rocketmq-rust-bot left a comment

Choose a reason for hiding this comment

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

LGTM - All CI checks passed ✅

Copy link
Owner

@mxsm mxsm left a comment

Choose a reason for hiding this comment

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

LGTM

@mxsm mxsm merged commit 16597ca into mxsm:main Feb 4, 2026
16 of 27 checks passed
@rocketmq-rust-bot rocketmq-rust-bot added approved PR has approved and removed ready to review waiting-review waiting review this PR labels Feb 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Enhancement✨] Remove useless code from perm_broker_header.rs

4 participants