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

Use slices directly instead of &Vec #10328

Merged
merged 4 commits into from Sep 12, 2023
Merged

Conversation

sholderbach
Copy link
Member

Simplifies the signature, makes it more flexible.
Detected a few unnecessary allocations in the process.

Simplifies the signature, makes it more flexible.
Detected a few unnecessary allocations in the process.
As `slice::contains()` does not use the `Borrow` trait trick to make
the item type flexible like `HashMap::contains()`, use of equivalent
manual implementation (should not be specialized)
Copy link
Collaborator

@WindSoilder WindSoilder left a comment

Choose a reason for hiding this comment

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

Cool! It looks good to me

@WindSoilder WindSoilder merged commit e90b099 into nushell:main Sep 12, 2023
19 checks passed
@sholderbach sholderbach deleted the vec-slicing branch September 12, 2023 06:22
hardfau1t pushed a commit to hardfau1t/nushell that referenced this pull request Dec 14, 2023
Simplifies the signature, makes it more flexible.
Detected a few unnecessary allocations in the process.
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.

None yet

2 participants