From ba3062b654744fc28585c2a19c305b948dbe5193 Mon Sep 17 00:00:00 2001 From: Denis Bilenko Date: Tue, 4 Mar 2025 10:01:45 +0100 Subject: [PATCH] rm copy --- libs/patchwheel/parse.go | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/libs/patchwheel/parse.go b/libs/patchwheel/parse.go index 854f62fb8..fc1b04087 100644 --- a/libs/patchwheel/parse.go +++ b/libs/patchwheel/parse.go @@ -24,6 +24,8 @@ func ParseWheelFilename(filename string) (*WheelInfo, error) { // The last three parts are always tags tagStartIdx := len(parts) - 3 + tags := parts[tagStartIdx:] + tags[2] = strings.TrimSuffix(tags[2], ".whl") // Everything before the tags except the version is the distribution versionIdx := tagStartIdx - 1 @@ -32,11 +34,6 @@ func ParseWheelFilename(filename string) (*WheelInfo, error) { distribution := strings.Join(parts[:versionIdx], "-") version := parts[versionIdx] - // Extract tags (remove .whl from the last one) - tags := make([]string, 3) - copy(tags, parts[tagStartIdx:]) - tags[2] = strings.TrimSuffix(tags[2], ".whl") - return &WheelInfo{ Distribution: distribution, Version: version,