Skip to content

Commit 2fc6004

Browse files
Remove unnecessary slices operations
1 parent f5c7610 commit 2fc6004

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

extractor/filesystem/language/javascript/packagejson/packagejson.go

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ import (
2222
"io"
2323
"io/fs"
2424
"path/filepath"
25-
"slices"
2625

2726
"deps.dev/util/semver"
2827
"github.com/google/osv-scalibr/extractor"
@@ -321,9 +320,8 @@ func mergeDependencyDetails(existing, current dependencyDetails) dependencyDetai
321320
}
322321

323322
// Otherwise depGroups are a sum of existing and current
324-
merged := append(existing.depGroups, current.depGroups...)
325-
slices.Sort(merged)
326-
existing.depGroups = slices.Compact(merged)
323+
existing.depGroups = append(existing.depGroups, current.depGroups...)
324+
327325
return existing
328326
}
329327

0 commit comments

Comments
 (0)