Skip to content
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

style: fix clippy warning #2764

Merged
merged 1 commit into from
Apr 16, 2023
Merged

style: fix clippy warning #2764

merged 1 commit into from
Apr 16, 2023

Conversation

siyou
Copy link
Contributor

@siyou siyou commented Apr 15, 2023

  • useless use of 'vec!'
  • needless borrow
  • redundant closure

Summary

🤖 Generated by Copilot at 7508115

This pull request optimizes and refactors the compilation.rs module in the node_binding crate, which handles the conversion of JavaScript values to Rust values. It reduces memory usage and improves performance by avoiding unnecessary operations.

Related issue (if exists)

Walkthrough

🤖 Generated by Copilot at 7508115

  • Simplify the syntax of creating empty vectors and mapping string slices to PathBufs in crates/node_binding/src/js_values/compilation.rs (link, link, link, link, link, link)
  • Avoid cloning self.inner when passing it to from_chunk_group method in the same file (link)

- useless use of 'vec!'
- needless borrow
- redundant closure
@siyou siyou requested a review from h-a-n-a as a code owner April 15, 2023 16:46
@changeset-bot
Copy link

changeset-bot bot commented Apr 15, 2023

⚠️ No Changeset found

Latest commit: 7508115

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@CLAassistant
Copy link

CLAassistant commented Apr 15, 2023

CLA assistant check
All committers have signed the CLA.

Copy link
Contributor

@hyf0 hyf0 left a comment

Choose a reason for hiding this comment

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

Thank you!

@hyf0 hyf0 added this pull request to the merge queue Apr 16, 2023
Merged via the queue into web-infra-dev:main with commit 3da3155 Apr 16, 2023
siyou added a commit to siyou/rspack that referenced this pull request May 14, 2023
- useless use of 'vec!'
- needless borrow
- redundant closure
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants