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

Avoid a Vec allocation #867

Merged
merged 1 commit into from
Oct 28, 2023
Merged

Conversation

harrisonkaiser
Copy link
Contributor

This was found using clippy with -D clippy::perf. Since we know the size of the slice at compile time, we can avoid heap allocating a Vec.

This was found using clippy with `-D clippy::perf`. Since we know the size of the
slice at compile time, we can avoid heap allocating a Vec.
@harrisonkaiser
Copy link
Contributor Author

Interesting: ci / test (msrv) failed:

error: package `regex-automata v0.4.3` cannot be built because it requires rustc 1.65 or newer, while the currently active rustc version is 1.63.0

regex-automata must have bumped their msrv since the last PR.

@Keats Keats merged commit a9ee9e0 into Keats:master Oct 28, 2023
5 of 6 checks passed
@Keats
Copy link
Owner

Keats commented Oct 28, 2023

Thanks!

@harrisonkaiser harrisonkaiser deleted the save_vec_allocation branch October 30, 2023 17:08
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.

2 participants