Fix incorrect use of sort.Slice
This commit is contained in:
@@ -133,7 +133,7 @@ func getProxies(server *Server, router adapter.Router) func(w http.ResponseWrite
|
|||||||
defaultTag = allProxies[0]
|
defaultTag = allProxies[0]
|
||||||
}
|
}
|
||||||
|
|
||||||
sort.Slice(allProxies, func(i, j int) bool {
|
sort.SliceStable(allProxies, func(i, j int) bool {
|
||||||
return allProxies[i] == defaultTag
|
return allProxies[i] == defaultTag
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
@@ -220,7 +220,7 @@ func (g *URLTestGroup) Fallback(used adapter.Outbound) []adapter.Outbound {
|
|||||||
outbounds = append(outbounds, detour)
|
outbounds = append(outbounds, detour)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
sort.Slice(outbounds, func(i, j int) bool {
|
sort.SliceStable(outbounds, func(i, j int) bool {
|
||||||
oi := outbounds[i]
|
oi := outbounds[i]
|
||||||
oj := outbounds[j]
|
oj := outbounds[j]
|
||||||
hi := g.history.LoadURLTestHistory(RealTag(oi))
|
hi := g.history.LoadURLTestHistory(RealTag(oi))
|
||||||
|
|||||||
Reference in New Issue
Block a user