Skip to content

Commit

Permalink
use util.UnsortedKeys
Browse files Browse the repository at this point in the history
Co-authored-by: Daniel Bradley <[email protected]>
  • Loading branch information
thomas11 and danielrbradley committed Jan 28, 2025
1 parent afcdc5e commit ebd544c
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions provider/pkg/versioning/gen.go
Original file line number Diff line number Diff line change
Expand Up @@ -122,10 +122,7 @@ func (v VersionMetadata) GetOldApiVersionsPerModule() map[openapi.ModuleName][]o

// If there are any old versions, sort them and add them to the result.
if len(oldVersionsSet) > 0 {
oldVersions := []openapi.ApiVersion{}
for version := range oldVersionsSet {
oldVersions = append(oldVersions, version)
}
oldVersions := util.UnsortedKeys(oldVersionsSet)
slices.SortStableFunc(oldVersions, openapi.CompareApiVersions)
result[moduleName] = oldVersions
}
Expand Down

0 comments on commit ebd544c

Please sign in to comment.