-
Notifications
You must be signed in to change notification settings - Fork 174
[ISSUE #4099]♻️Clean up existing clippy warnings of vec_init_then_push, redundant_closure and useless_conversion #4097
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
- vec_init_then_push - redundant_closure - useless_conversion
🔊@WaterWhisperer 🚀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.
Pull Request Overview
This PR addresses Rust clippy warnings by cleaning up code patterns that are redundant or inefficient. The changes focus on removing unnecessary closures, eliminating redundant conversions, and replacing the vec-init-then-push pattern with direct vector initialization.
- Simplifies closures in benchmark functions by removing redundant wrapper closures
- Replaces vec initialization followed by multiple push operations with direct
vec![]
macro usage - Removes unnecessary type conversions like
PathBuf::from()
and.into_iter()
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.
Show a summary per file
File | Description |
---|---|
rocketmq-store/benches/delivery.rs | Simplified benchmark function closures |
rocketmq-example/examples/consumer/pop_consumer.rs | Removed redundant .into_iter() call |
rocketmq-client/examples/batch/simple_batch_producer.rs | Replaced vec initialization pattern with vec![] macro |
rocketmq-client/examples/batch/callback_batch_producer.rs | Replaced vec initialization pattern with vec![] macro |
rocketmq-broker/src/broker_path_config_helper.rs | Removed redundant PathBuf::from() conversion |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #4097 +/- ##
=======================================
Coverage 26.56% 26.56%
=======================================
Files 575 575
Lines 81359 81359
=======================================
Hits 21609 21609
Misses 59750 59750 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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)
#4087 Not complete yet
Fix #4099
Brief Description
Clean up existing clippy warnings of types:
How Did You Test This Change?