Don't count added labels when initializing slice (#10756)

This was added in #10749 but based on feedback it might be over-allocating so worth removing.

Signed-off-by: Łukasz Mierzwa <l.mierzwa@gmail.com>
This commit is contained in:
Łukasz Mierzwa 2022-06-04 04:15:02 +01:00 committed by GitHub
parent 355b8bcf0b
commit b11062bfcc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -452,7 +452,7 @@ func (b *Builder) Labels() Labels {
// In the general case, labels are removed, modified or moved
// rather than added.
res := make(Labels, 0, len(b.base)+len(b.add))
res := make(Labels, 0, len(b.base))
Outer:
for _, l := range b.base {
for _, n := range b.del {