-
Notifications
You must be signed in to change notification settings - Fork 119
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
[ISSUE #2503 ] RemotingCommand some methods add #[inline] #2575
[ISSUE #2503 ] RemotingCommand some methods add #[inline] #2575
Conversation
WalkthroughThe pull request introduces several new inline methods to the Changes
Possibly related PRs
Suggested labels
Suggested reviewers
Poem
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
Documentation and Community
|
🔊@siddheshzz 🚀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💥. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (1)
rocketmq-remoting/src/protocol/remoting_command.rs (1)
615-618
: Consider removing duplicate getter methods.The methods
get_ext_fields
andext_fields
provide identical functionality. Consider removing one of them to avoid confusion and maintain a single source of truth.- #[inline] - pub fn get_ext_fields(&self) -> Option<&HashMap<CheetahString, CheetahString>> { - self.ext_fields.as_ref() - }Also applies to: 722-725
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
rocketmq-remoting/src/protocol/remoting_command.rs
(6 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (9)
- GitHub Check: build (windows-latest, nightly)
- GitHub Check: build (windows-latest, stable)
- GitHub Check: build (macos-latest, nightly)
- GitHub Check: build (macos-latest, stable)
- GitHub Check: build (ubuntu-latest, nightly)
- GitHub Check: test
- GitHub Check: build
- GitHub Check: build (ubuntu-latest, stable)
- GitHub Check: auto-approve
🔇 Additional comments (3)
rocketmq-remoting/src/protocol/remoting_command.rs (3)
308-322
: LGTM! Well-designed setter methods.The new inline methods for setting remarks follow Rust's builder pattern and mutability conventions. The
#[inline]
attribute is appropriate for these small, frequently called methods.
330-350
: LGTM! Well-implemented body and suspension setters.The new inline methods for setting body and suspension state follow Rust's ownership and borrowing rules. The
#[inline]
attribute is appropriate for these small, frequently called methods.
352-382
: LGTM! Well-implemented serialization and RPC marking methods.The new inline methods for serialization type and RPC marking use correct bit operations and follow Rust's conventions. The
#[inline]
attribute is appropriate for these small, frequently called methods.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #2575 +/- ##
=======================================
Coverage 28.55% 28.55%
=======================================
Files 515 515
Lines 74514 74514
=======================================
Hits 21281 21281
Misses 53233 53233 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Which Issue(s) This PR Fixes(Closes)
RemotingCommand some methods add #[inline]
Fixes #2503
Brief Description
How Did You Test This Change?
cargo test --all-features --workspace
Summary by CodeRabbit