mirror of
https://github.com/octoleo/restic.git
synced 2024-12-26 20:30:19 +00:00
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
Block a user