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 append instead of copy to clone slices #58

Merged
merged 1 commit into from May 18, 2022
Merged

Use append instead of copy to clone slices #58

merged 1 commit into from May 18, 2022

Conversation

twz123
Copy link
Contributor

@twz123 twz123 commented May 18, 2022

The append notation is more concise and should be more efficient, since the target slice won't be initialized with zero values first.

The append notation is more concise and should be more efficient, since
the target slice won't be initialized with zero values first.
@CLAassistant
Copy link

CLAassistant commented May 18, 2022

CLA assistant check
All committers have signed the CLA.

@codecov
Copy link

codecov bot commented May 18, 2022

Codecov Report

Merging #58 (43f4180) into master (6fede5c) will not change coverage.
The diff coverage is 100.00%.

@@            Coverage Diff            @@
##            master       #58   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            1         1           
  Lines          112       108    -4     
=========================================
- Hits           112       108    -4     
Impacted Files Coverage Δ
error.go 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 6fede5c...43f4180. Read the comment docs.

Copy link
Collaborator

@abhinav abhinav left a comment

Choose a reason for hiding this comment

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

Looks good. Thanks!

I ran the benchmarks locally just to be make sure there are no regressions; it performs the same before and after.

@abhinav abhinav merged commit f46d400 into uber-go:master May 18, 2022
@twz123 twz123 deleted the clone-via-append branch May 19, 2022 09:06
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