fix(search): revert repo query revert. Fixes #1623
This commit is contained in:
2 files changed
+5
-7
No files matched your search
+1
-1
@@ -139,7 +139,7 @@ func queryRepo(pkgInputN []string, dbExecutor db.Executor, sortMode int) repoQue
|
||||
s := repoQuery(dbExecutor.SyncPackages(pkgInputN...))
|
||||
|
||||
if sortMode == settings.BottomUp {
|
||||
s = sort.Reverse(s).(repoQuery)
|
||||
s.Reverse()
|
||||
}
|
||||
|
||||
return s
|
||||
|
||||
+4
-6
@@ -24,12 +24,10 @@ type aurSortable struct {
|
||||
sortMode int
|
||||
}
|
||||
|
||||
func (r repoQuery) Len() int {
|
||||
return len(r)
|
||||
}
|
||||
|
||||
func (r repoQuery) Swap(i, j int) {
|
||||
r[i], r[j] = r[j], r[i]
|
||||
func (r repoQuery) Reverse() {
|
||||
for i, j := 0, len(r)-1; i < j; i, j = i+1, j-1 {
|
||||
r[i], r[j] = r[j], r[i]
|
||||
}
|
||||
}
|
||||
|
||||
func (r repoQuery) Less(i, j int) bool {
|
||||
|
||||
Reference in new issue
Block a user