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

fix: fix slice init length #766

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

davidwoood
Copy link

@davidwoood davidwoood commented Oct 25, 2024

Description

The intention here should be to initialize a slice with a capacity of value.Count() rather than initializing the length of this slice.

The online demo: https://go.dev/play/p/q1BcVCmvidW


For contributor use:

  • Targeted PR against master branch
  • Linked to GitHub issue with discussion and accepted design OR link to spec that describes this work
  • Code follows the standards mentioned here
  • Updated relevant documentation
  • Re-reviewed Files changed in the GitHub PR explorer
  • Added appropriate labels

@bluesign
Copy link
Collaborator

thank you for fixing this @davidwoood

Copy link
Contributor

@janezpodhostnik janezpodhostnik left a comment

Choose a reason for hiding this comment

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

Nice find

@codecov-commenter
Copy link

Codecov Report

Attention: Patch coverage is 0% with 1 line in your changes missing coverage. Please review.

Project coverage is 34.50%. Comparing base (96c4f80) to head (058ba6e).
Report is 35 commits behind head on master.

Files with missing lines Patch % Lines
server/debugger/debugsession.go 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #766      +/-   ##
==========================================
- Coverage   35.30%   34.50%   -0.80%     
==========================================
  Files          47       45       -2     
  Lines        7418     7320      -98     
==========================================
- Hits         2619     2526      -93     
  Misses       4610     4610              
+ Partials      189      184       -5     
Flag Coverage Δ
unittests 34.50% <0.00%> (-0.80%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

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.

4 participants