perf(tree-shaking): ⚡️ use take instead of clone#1429
Conversation
Walkthrough对 Changes
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 as PR comments)
Additionally, you can add CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Actionable comments posted: 0
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (1)
- crates/mako/src/plugins/tree_shaking/shake.rs (3 hunks)
Additional comments not posted (3)
crates/mako/src/plugins/tree_shaking/shake.rs (3)
12-12: 引入Take工具。引入
Take工具是为了替换克隆操作,提高效率和所有权管理。
260-260: 可变借用tsm。对
tsm进行可变借用是为了进行潜在的更新操作。
273-273: 使用take方法。使用
take方法代替克隆操作,提高了效率和所有权管理。
benchmark with with-antd
Summary by CodeRabbit