mirror of
https://github.com/restic/restic.git
synced 2025-10-19 15:43:21 +00:00
Merge pull request #5556 from greatroar/cleanup
ui/backup: Prepend, then sort (micro-optimization)
This commit is contained in:
commit
aa0fb0210a
1 changed files with 3 additions and 3 deletions
|
@ -62,12 +62,12 @@ func (b *TextProgress) Update(total, processed Counter, errors uint, currentFile
|
|||
)
|
||||
}
|
||||
|
||||
lines := make([]string, 0, len(currentFiles)+1)
|
||||
lines := make([]string, 1, len(currentFiles)+1)
|
||||
lines[0] = status
|
||||
for filename := range currentFiles {
|
||||
lines = append(lines, filename)
|
||||
}
|
||||
sort.Strings(lines)
|
||||
lines = append([]string{status}, lines...)
|
||||
sort.Strings(lines[1:])
|
||||
|
||||
b.term.SetStatus(lines)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue