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

Remove unnecessary clone in Key type #491

Merged
merged 1 commit into from Mar 25, 2021

Conversation

Folyd
Copy link
Contributor

@Folyd Folyd commented Mar 25, 2021

I'm quite sure we should consume the Key's ownership to construct a new KeyValue.
If the user did need to reuse the Key to create multiple KeyValue, they can just clone it later.

This change can slightly improve the performance I think. However, I haven't done a benchmark.

@Folyd Folyd requested a review from a team as a code owner March 25, 2021 12:17
Copy link
Contributor

@djc djc left a comment

Choose a reason for hiding this comment

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

Makes sense to me!

@jtescher jtescher merged commit 785048a into open-telemetry:main Mar 25, 2021
@Folyd Folyd deleted the remove-unnecessary-clone branch March 25, 2021 16:19
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

3 participants