mirror of
https://github.com/restic/restic.git
synced 2026-02-03 04:20:45 -05:00
ui/backup: Prepend, then sort (micro-optimization)
This commit is contained in:
parent
481fcb9ca7
commit
20b38010e1
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…
Reference in a new issue