mirror of https://github.com/restic/restic.git
Replace sort.Stable by sort.Strings
Calling the slow, O(n lg² n) sort.Stable is equivalent to sort.Strings for a slice of unique strings.
This commit is contained in:
parent
f2bf06a419
commit
3a6feb0596
|
@ -515,7 +515,7 @@ func (arch *Archiver) SaveTree(ctx context.Context, snPath string, atree *Tree,
|
|||
for name := range atree.Nodes {
|
||||
names = append(names, name)
|
||||
}
|
||||
sort.Stable(sort.StringSlice(names))
|
||||
sort.Strings(names)
|
||||
|
||||
for _, name := range names {
|
||||
subatree := atree.Nodes[name]
|
||||
|
|
Loading…
Reference in New Issue